The GATE Grind

GATE 2008 CS – Question 60

Programming and Data Structures · Programming in C · 2 marks · Multiple choice

What is printed by this C program?

int f(int x, int *py, int **ppz) {
 int y,z;
 **ppz += 1; z = **ppz;
 *py += 2; y = *py;
 x += 3;
 return x+y+z;
}
void main() {
 int c,*b,**a;
 c=4; b=&c; a=&b;
 printf("%d",f(c,b,a));
}
  1. 18
  2. 19
  3. 21
  4. 22

Practise this question in The GATE Grind →

Show answer and explanation

Correct answer: (B) 19

Explanation

We are sorry we couldn't write detailed soluition for this, we are working on it!, please consider asking your own AI, its just 2-3 clicks with very minimum effort

More Programming in C questions

All Programming in C questions →