Skip to content
Related Articles

Related Articles

Improve Article

GATE | GATE CS 2008 | Question 85

  • Last Updated : 28 Jun, 2021

Which combination of the integer variables x, y and z makes the variable a get the value 4 in the following expression?




a = ( x > y ) ? (( x > z ) ? x : z) : (( y > z ) ? y : z )

(A) x = 3, y = 4, z = 2
(B) x = 6, y = 5, z = 3
(C) x = 6, y = 3, z = 5
(D) x = 5, y = 4, z = 5


Answer: (A)

Explanation: The given expression assigns maximum among three elements (x, y and z) to a.

Quiz of this Question

Attention reader! Don’t stop learning now.  Practice GATE exam well before the actual exam with the subject-wise and overall quizzes available in GATE Test Series Course.

Learn all GATE CS concepts with Free Live Classes on our youtube channel.

My Personal Notes arrow_drop_up
Recommended Articles
Page :