What will be the output of the following C code? [code] #include <stdio.h> void f(int (*x)(int)); int myfoo(int); int (*fooptr)(

What will be the output of the following C code?
Code:
    #include <stdio.h>
    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\n", i + 1);
    }
A. 10
B. 11
C. Compile time error
D. Undefined behaviour
 

Tìm kiếm

Back
Top