Question: int fun1(int a, int b) { a = a * 2; return a+b; } int fun2(int &a, int &b) { a = a - 2;
int fun1(int a, int b) {
a = a * 2; return a+b;
}
int fun2(int &a, int &b) {
a = a - 2; b = b * 3; return b - a;
}
int main() {
int x = 3, y = 12; int z = fun1(x, y); cout << fun2(z,y) << " ";
cout << x << " " << y << " " << z;
return 0;
}
What are the values of x, y, and z after the execution of fun1?
What are the values of x, y, and z after the execution of fun2?
What is the final output of this program?
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
