Vidyalelo
C Programming · Q136

Structure and Union

Programming · C Programming · question 136

Q136

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 = 4; printf("%d ", p.y);

A.
0
Answer
B.
4
C.
Depends on the compiler
D.
2

Answer: Option A

Solution

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