Consider the following function implemented in C: void printxy(int x, int y) {…
GATE · 2017 · CS · Set 2 · Computer Science & IT
Consider the following function implemented in C:
void printxy(int x, int y) { int *ptr; x=0; ptr=&x; y=*ptr; *ptr=1; printf(“%d, %d”, x, y); }
The output of invoking printxy(1,1) is:
- A.
0,0
- B.
0,1
- C.
1,0
- D.
1,1
Attempted by 399 students.
Sign up free to check your answer
Sign up freeLoading lesson…