Home » C Programming » Pointers » Question
  1. What will be the output of the following C code?
    #include <stdio.h>
    void first(int (*p)(int));
    int second(int);
    int (*funptr)(int);
    int ((*fun(int)))(int);
    int main()
    {
    funptr = fun(0);
    funptr(15);
    }
    int ((*fun(int k)))(int)
    {
    return second;
    }
    int second(int k)
    {
    printf("%d\n", k + 1);
    }
    1. 15
    2. Compilation Error
    3. Undefined behaviour
    4. 16
    5. None of these
Correct Option: D

16



Your comments will be displayed only after manual approval.