Gate CS-2008 Question Paper With Solutions

Q. 73 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:

Gate CS-2008 Question Paper With Solutions

Learn More:   Gate ME-2010 Question Paper With Solutions

LEAVE A REPLY

Please enter your comment!
Please enter your name here