Question: Assume that you have a function called doSomething that has the following definition: void doSomething ( int x , double & val ) { /
Assume that you have a function called "doSomething" that has the following definition:
void doSomethingint double & val
code written here
Also, inside the "main" function, you have the following code segment:
int ;
double myVal;
doSomething myVal ;
which of the following is correct?
Select one:
this code gives syntax error
the variable "myVal" is passed by value
the variable can be updated by the function "doSomething"
the variable "myVal" can be updated by the function "doSomething"
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
