Home » C Programming » Pointers » Question
  1. What will be the output of the following C code?
    #include <stdio.h>
    void first(int (*x)(int));
    int second(int i);
    int (*third)(int) = second;
    int main()
    {
    first(third(13));
    }
    void first(int (*k)(int))
    {
    k(12);
    }
    int second(int k)
    {
    printf("%d\n", k);
    return k;
    }
    1. Compilation Error
    2. Nothing
    3. Garbage value
    4. Segmentation fault
    5. None of these
Correct Option: D

Segmentation fault



Your comments will be displayed only after manual approval.