Question 141

What is the output? printf("%d", 5 > 3 && 2 > 4 || 1);

What is the output? printf("%d", 5 > 3 && 2 > 4 || 1);
  1. A1
  2. B0
  3. CCompile error
  4. D5
Show answerHide answer

Correct answer: (A) 1

Explanation

(1 && 0) || 1 = 0 || 1 = 1.

From DSSSB TGT Computer Science Full Mock Test 1

This is question 141 of DSSSB TGT Computer Science Full Mock Test 1. See all questions of this paper with answers, or attempt the paper as a timed online test to get your score and all-India rank.