Solved

Given the Function,and the Main Function Calling It: What Is

Question 9

Multiple Choice

Given the function,and the main function calling it: What is the output of the following code if you omit the ampersand (&) from the first parameter,but not from the second parameter? (You are to assume this code is embedded in a correct function that calls it. ) : #include <iostream>
Using namespace std;
Void func(int & x,int & y)
{
Int t = x;
X = y;
Y = t;
}
Int main()
{
Int u = 3;v = 4;
// ) ..
Cout << u << " " << v << endl;
Func ( u,v )
Cout << u << " " << v << endl;
// ) ..
}


A) 3 4 3 3
B) 3 4 4 3
C) 3 4 3 4
D) 3 4 4 4
E) none of the above.If you choose this,you must specify the output.

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions