Answer:
B. 1 6 3
Explanation:
Given function definition for calc:
void calc (int a, int& b)
{
int c;
c = a + 2;
a = a * 3;
b = c + a;
}
Function invocation:
x = 1;
y = 2;
z = 3;
calc(x, y);
cout << x << " " << y << " " << z << endl;
Tracing the function execution:
c=3
a=3
b=c+a = 6;
But b actually corresponds to y. So y=6 after function call.
So output: 1 6 3