1.

What will be the output of the following C code?
#include <stdio.h>
int main()
{
int num[4][5];
f(num);
}
void f(int (*num)[4])
{
int n1 = 15, n2 = 13, n;
num[0] = &n1;
num[1] = &n2;
for (n = 0; n < 2; n++)
printf("%d n", *num[n]);
}

A. Compilation Error
B. Garbage value
C. Undefined behaviour
D. Compilation Error
E. segmentation fault/code crash
Answer» E. segmentation fault/code crash


Discussion

No Comment Found