Question 33Asked in DSSSB TGT Computer Science (Technical), 12 Sep 2025, Shift 1 (9:00 AM)

What will be the output of the following code snippet? int main() {

What will be the output of the following code snippet? #include<stdio.h> int main() { int a = 5, b = 3, c = 0; if (a > b > c) { printf("True\n"); } else { printf("False\n"); } return 0; }
  1. Acompile time error
  2. Bundefined behavior
  3. CTRUE
  4. DFALSE
Show answerHide answer

Correct answer: (C) TRUE

Explanation

Relational operators are evaluated left to right: (5 > 3) gives 1, then 1 > 0 gives 1 (true), so "True" is printed.

From DSSSB TGT Computer Science PYQ (Technical), 12 Sep 2025, Shift 1 (9:00 AM)

This is question 33 of DSSSB TGT Computer Science PYQ (Technical), 12 Sep 2025, Shift 1 (9:00 AM). 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.