Examveda

What will be the output of the following C code?
#include <stdio.h>
int *(*(x()))[2];
typedef int **(*ptrfoo)())[2];
int main()
{
    ptrfoo ptr1;
    ptr1 = x;
    ptr1();
    return 0;
}
int *(*(x()))[2]
{
    int (*ary)[2] = malloc(sizeof * ary);
    return &ary;
}

A. Compile time error

B. Nothing

C. Undefined behaviour

D. Depends on the standard

Answer: Option B


This Question Belongs to C Program >> Structure And Union

Join The Discussion

Related Questions on Structure and Union