state gov UPPCL Assistant Accountant 2022 - 23 Mock Test Programming and Data Structure Programming in C
What is the output of the statement?
Int x, y;
Scanf (“%d”, &x);
Y = (x > 5 ? 3 : 4);1
This statement will store 3 in y if x is greater than 5, otherwise, it will store 4 in y.
2
This statement will store 2 in y if x is greater than 5, otherwise, it will store 3 in y.
3
This statement will store 6 in y if x is greater than 5, otherwise, it will store 4 in y.
4
This statement will store 4 in y if x is greater than 5, otherwise, it will store 3 in y.