What is printed by the following C program?
int f(int x, int *py, int **ppz)
int y, z;
**ppz += 1; z = **ppz; // corrected z = *ppz; to z = **ppz;
*py += 2; y = *py;
x += 3;
int c, *b, **a;
c = 4; b = &c; a = &b;
printf("%d", f(c, b, a));
Mistake is there.
Return $x+y+z =$ return $7 + 7 + 5 =$ return $19$
So, option B $= 19$ is correct.
Answer is B.
z = *ppz is a typo and it must be z = **ppz;
Answer is B
Yes. But you can't complain so in GATE. GATE takers are expected to apply logic to correct the questions since GATE 2013. Never say "mistake" in question paper- they are made by experts.
The tests are there but it ain't free. Cost is...