Vidyalelo
C Programming · Q154

C Fundamentals

Programming · C Programming · question 154

Q154

What will be the output of the following C code? #include int main() int a = 2; int b = 0; int y = (b == 0) ? a :(a > b) ? (b = 1): a; printf("%d ", y);

A.
Compile time error
B.
1
C.
2
Answer
D.
Undefined behaviour

Answer: Option C

Solution

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