MCQOPTIONS
Saved Bookmarks
| 1. |
What will be the output of the following C code? #include <stdio.h> union Un { struct { unsigned char x : 2; unsigned int y : 2; }s; int x; }; int main() { union Un u.s.x = 2; printf("%d n", Un.s.x); } |
| A. | Compilation Error |
| B. | Garbage value |
| C. | 2 |
| D. | Nothing |
| E. | Undefined behaviour |
| Answer» B. Garbage value | |