Gate CS-2016-1 Question Paper With Solutions

Q. 22 Consider the following C program.

void f(int, short);  void main()  {    int i = 100;    short s = 12;    short *p = &s;    __________ ;   // call to f()  } 

Which one of the following expressions, when placed in the blank above, will NOT result in a type checking error?

(A) f(s, *s)

(B) i = f(i,s)

(C) f(i,*s)

(D) f(i,*p)

Answer: (D)

Explanation:

Gate CS-2016-1 Question Paper With Solutions

Learn More:   Gate CS-2019 Question Paper With Solutions

LEAVE A REPLY

Please enter your comment!
Please enter your name here