Vidyalelo
C Programming · Q132

Structure and Union

Programming · C Programming · question 132

Q132

What will be the output of the following C code? #include struct p unsigned int x : 2; unsigned int y : 2; ; int main() struct p p; p.x = 3; p.y = 1; printf("%d ", sizeof(p));

A.
Compile time error
B.
Depends on the compiler
C.
2
D.
4
Answer

Answer: Option D

Solution

Answer: Option D
No explanation is given for this question Let's Discuss on Board