Vidyalelo
C Programming · Q249

Pointer

Programming · C Programming · question 249

Q249

What will be the output of the following C code? #include void f(int (*x)(int)); int myfoo(int); int (*fooptr)(int); int ((*foo(int)))(int); int main() fooptr = foo(0); fooptr(10); int ((*foo(int i)))(int) return myfoo; int myfoo(int i) printf("%d ", i + 1);

A.
10
B.
11
Answer
C.
Compile time error
D.
Undefined behaviour

Answer: Option B

Solution

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