Vidyalelo
C Programming · Q95

Structure and Union

Programming · C Programming · question 95

Q95

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

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

Answer: Option C

Solution

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