Examveda
Examveda

What will be the output of the following C code?
#include <stdio.h>
void f(int (*x)(int));
int myfoo(int);
int (*foo)() = myfoo;
int main()
{
    f(foo);
}
void f(int(*i)(int ))
{
    i(11);
}
int myfoo(int i)
{
    printf("%d\n", i);
    return i;
}

A. 10 11

B. 11

C. 10

D. Undefined behaviour

Answer: Option B


This Question Belongs to C Program >> Pointer

Join The Discussion

Related Questions on Pointer