6. (10%) What is the output n marked by (a) and (b) of the following C++ program?
int n=6; int f1(int k) int f2(int *p)
f1(n) ; {… {…
cout << n ; //(a) k += 6; *p += 6;
f2(&n) ; } }
cout << n ; //(b)
6. (10%) What is the output n marked by (a) and (b) of the following C++ program?
int n=6; int f1(int k) int f2(int *p)
f1(n) ; {… {…
cout << n ; //(a) k += 6; *p += 6;
f2(&n) ; } }
cout << n ; //(b)