Given i = 0, j = 1, k = –1 x = 0.5, y = 0.0
Given i = 0, j = 1, k = –1
x = 0.5, y = 0.0
What is the output of given 'C' expression?
x * 3 && 3 || j | k
Show answerHide answer
Correct answer: (C) 1
Explanation
x * 3 = 1.5, which is non-zero (true), and 3 is true, so x * 3 && 3 = 1. Then 1 || (j | k) = 1 (logical OR returns 1). The output is 1.