1.

What is the output of the statement?Int x, y;Scanf (“%d”, &x);Y = (x > 5 ? 3 : 4);

A. This statement will store 3 in y if x is greater than 5, otherwise, it will store 4 in y.
B. This statement will store 2 in y if x is greater than 5, otherwise, it will store 3 in y.
C. This statement will store 6 in y if x is greater than 5, otherwise, it will store 4 in y.
D. This statement will store 4 in y if x is greater than 5, otherwise, it will store 3 in y.
Answer» B. This statement will store 2 in y if x is greater than 5, otherwise, it will store 3 in y.


Discussion

No Comment Found