

MCQOPTIONS
Saved Bookmarks
1. |
What will be the output of the following C code?#include <stdio.h> struct option1 { int m; int n; }; struct option2 { int m; int n; }; struct option1 fun(); int main() { struct option1 opt1 = {11}; struct option2 opt2 = {21, 31}; opt2 = fun(); printf("%d n", opt2.m); } struct option1 fun() { struct option1 temp = {11, 21}; return temp; } |
A. | 21 |
B. | 11 |
C. | Compilation Error |
D. | Undefined behaviour |
E. | None of these |
Answer» D. Undefined behaviour | |