

MCQOPTIONS
Saved Bookmarks
1. |
What will be the output of the following C code?#include <stdio.h> struct Stru { unsigned int ch : 2; unsigned int n : 2; }; int main() { struct Stru s; s.ch = 3; s.n = 1; printf("%d n", sizeof(s)); } |
A. | 2 |
B. | 4 |
C. | Undefined behaviour |
D. | Garbage value |
E. | None of these |
Answer» C. Undefined behaviour | |