What will be the output of the following C code?
#include <stdio.h>
int main()
{
int i = 0, j = 1;
int *a[] = {&i, &j};
printf("%d", (*a)[1]);
return 0;
}
#include <stdio.h>
int main()
{
int i = 0, j = 1;
int *a[] = {&i, &j};
printf("%d", (*a)[1]);
return 0;
}
A. Compile time error
B. Undefined behaviour
C. 1
D. Some garbage value
Answer: Option D
Join The Discussion