Consider the following C program. void f(int, short); void main() { int i =…

GATE · 2016 · CS · Set 1 · Computer Science & IT

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?

  1. A.

    f(s,∗s)f(s,*s)

  2. B.

    i=f(i,s) i = f(i,s)

  3. C.

    f(i,∗s)f(i,*s)

  4. D.

    f(i,∗p)f(i,*p)

Attempted by 443 students.

Sign up free to check your answer

Sign up free

Explore the full course: Gate Guidance By Sanchit Sir

Loading lesson…