Home » C Programming » Pointers » Question
  1. What will be the output of the following C code?
    #include <stdio.h>
    void function(int);
    void (*fun)(float) = function;
    int main()
    {
    fun(12);
    }
    void function(int n)
    {
    printf("%d\n", n);
    }
    1. 12
    2. Undefined behaviour
    3. 12.000000
    4. Compilation Error
    5. None of these
Correct Option: B

Undefined behaviour



Your comments will be displayed only after manual approval.