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

Given the following code snippet, what is the value of the variable c?

Given the following code snippet, what is the value of the variable c? int a, b, c; a = b = c = 15; c = c + 10;
  1. AUndefined
  2. B10
  3. C25
  4. D15
Show answerHide answer

Correct answer: (C) 25

Explanation

All three variables are set to 15 by chained assignment, then c = 15 + 10 = 25.

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

This is question 22 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.