C Language MCQ - English
Which of the following is the correct usage of conditional operators used in C?
Home | Discussion ForumWhich of the following is the correct usage of conditional operators used in C?
a>b ? c=30 : c=40;
a>b ? c=30;
max = a>b ? a>c?a:c:b>c?b:c
return (a>b)?(a:b)
Answer : C
View More Related Question
1) The second expression (j-k), in the following expression will be evaluated (i+5) || (j-k)
If the expression (i+5) is true
If the expression (i+5) is false
Irrespective of whether (i+5) is true or false
Will not be evaluated in any case.
View Answer
2) Which of the following is the correct usage of conditional operators used in C?
3) Which of the following correctly shows the hierarchy of arithmetic operations in C?
4) Which of the following is the correct order of evaluation for the below expression?
z = x + y * z / 4 % 2 - 1
5) Which of the following is the correct order if calling functions in the below code?
a = f1(23, 14) * f2(12/4) + f3();