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

What does the += operator do in C?

  1. AAdds the right operand to the left operand and assigns the result to the left operand.
  2. BIt is used to concatenate two strings.
  3. CIt is an invalid operator.
  4. DAssigns the value of the right operand to the left operand.
Show answerHide answer

Correct answer: (A) Adds the right operand to the left operand and assigns the result to the left operand.

Explanation

a += b is shorthand for a = a + b: the right operand is added to the left one and the result is stored in the left operand.

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

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