Question 33Asked in DSSSB TGT Computer Science (Technical), 12 Sep 2025, Shift 3 (5:00 PM)

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

What will be the output of the following code? #include <stdio.h> int main() { if (5 > 10) printf("5 is greater than 10"); else printf("5 is not greater than 10"); return 0; }
  1. ANo output
  2. BSyntax error
  3. C5 is greater than 10
  4. D5 is not greater than 10
Show answerHide answer

Correct answer: (D) 5 is not greater than 10

Explanation

5 > 10 is false, so the else branch runs and prints "5 is not greater than 10".

From DSSSB TGT Computer Science PYQ (Technical), 12 Sep 2025, Shift 3 (5:00 PM)

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