Gate CS-2016-2 Question Paper With Solutions

Q. 22 The value printed by the following program is

void f(int* p, int m)  {      m = m + 5;      *p = *p + m;      return;  }  void main()  {      int i=5, j=10;      f(&i, j);      printf("%d", i+j);  } 

 

(A) 10

(B) 20

(C) 30

(D) 40

Answer: (C)

Explanation:

Gate CS-2016-2 Question Paper With Solutions

Learn More:   Gate ME-2010 Question Paper With Solutions

LEAVE A REPLY

Please enter your comment!
Please enter your name here