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

Consider the expression given below: x = a + b * (c − d) / e + f % g;

Consider the expression given below: x = a + b * (c − d) / e + f % g; The variables have the following values: a = 8, b = 5, c = 10, d = 3, e = 2, f = 7, g = 3; If the variables x, a, b, c, d, e, f, g are of integer data type, then what will be the value of x after evaluating the above expression?
  1. A24
  2. B26
  3. C20
  4. D21
Show answerHide answer

Correct answer: (B) 26

Explanation

b * (c − d) = 5 × 7 = 35, and 35 / 2 = 17 in integer division. f % g = 7 % 3 = 1. So x = 8 + 17 + 1 = 26.

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

This is question 56 of DSSSB TGT Computer Science PYQ (Technical), 13 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.