What will be the output of the following C code?
#include <stdio.h>
int main()
{
int *((*x)())[2];
x();
printf("after x\n");
}
int *((*x)())[2]
{
int **str;
str = (int*)malloc(sizeof(int)* 2);
return str;
}
#include <stdio.h>
int main()
{
int *((*x)())[2];
x();
printf("after x\n");
}
int *((*x)())[2]
{
int **str;
str = (int*)malloc(sizeof(int)* 2);
return str;
}
A. Compile time error
B. Undefined behaviour
C. After x
D. None of the mentioned
Answer: Option A
Join The Discussion