Home » Programming & Data Structure » Programming and data structure miscellaneous » Question

Programming and data structure miscellaneous

Programming & Data Structure

  1. 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. f (s,*s)
    2. i = f (i, s)
    3. f (i,*s)
    4. f (i,*p)
Correct Option: D

‘i’ is integer and *P is value of a pointer to short.



Your comments will be displayed only after manual approval.