1.

What will be the output of the following C code? #include <stdio.h> int *fun(); int main() { int *ptr = fun(); printf("%d n", *ptr); } int *fun() { int n = 12; return &n; }

A. Segmentation fault
B. Undefined behaviour
C. Compilation Error
D. 12
E. None of these
Answer» B. Undefined behaviour


Discussion

No Comment Found