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 doSomething(int x, double & val)
{
// code written here
}
Also, inside the "main" function, you have the following code segment:
int =8;
double myVal=100;
doSomething(, myVal );
which of the following is correct?
Select one:
this code gives syntax error
the variable "myVal" is passed by value
the variable "x" can be updated by the function "doSomething"
the variable "myVal" can be updated by the function "doSomething"
 Assume that you have a function called "doSomething" that has the

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!