1.

What will be the output of the following C code?#include <stdio.h> struct point1 { int x[2]; }; struct point2 { int *x; }; int main() { struct point1 p1 = {11, 22}; struct point2 *ptr1 = (struct q*)&p1; ptr1->x = (struct q*)&p1.x; printf("%d n", ptr1->x[0]); }

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


Discussion

No Comment Found

Related MCQs