Home » C Programming » Pointers » Question
  1. What will be the output of the following C code?
     #include <stdio.h>
    int subtract(int p, int q, int r)
    {
    return p - q - r;
    }
    void main()
    {
    int (*fun_ptr)(int, int, int);
    fun_ptr = &subtract;
    printf("The Subtraction of three numbers is : %d",
    (*fun_ptr)(21, 13, 41));
    }
    1. Nothing
    2. The Subtraction of three numbers is : -33
    3. Undefined behaviour
    4. Garbage value
    5. Compilation Error
Correct Option: B

The Subtraction of three numbers is : -33



Your comments will be displayed only after manual approval.