Vidyalelo
C Programming · Q138

Pointer

Programming · C Programming · question 138

Q138

What will be the output of the following C code? #include 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 ", i); return i;

A.
10 11
B.
11
Answer
C.
10
D.
Undefined behaviour

Answer: Option B

Solution

Answer: Option B
No explanation is given for this question Let's Discuss on Board