Vidyalelo
C Programming · Q292

C Fundamentals

Programming · C Programming · question 292

Q292

What will be the output of the following C code? #include int main() int x = 2, y = 0; int z = y && (y |= 10); printf("%d ", z); return 0;

A.
1
B.
0
Answer
C.
Undefined behaviour due to order of evaluation
D.
2

Answer: Option B

Solution

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