Bird
0
0

Which of the following assignment operators adds the right operand to the left operand and then assigns the result to the left operand?

easy📝 Conceptual Q11 of 15
C - Operators and Expressions
Which of the following assignment operators adds the right operand to the left operand and then assigns the result to the left operand?
A-=
B+=
C*=
D/=
Step-by-Step Solution
Solution:
  1. Step 1: Understand the meaning of += operator

    The operator += adds the value on the right to the variable on the left and stores the result back in the left variable.
  2. Step 2: Compare with other operators

    Other operators like -= subtract, *= multiply, and /= divide, so they do not add.
  3. Final Answer:

    += -> Option B
  4. Quick Check:

    += means add and assign [OK]
Quick Trick: Remember '+=' means add then assign to left variable [OK]
Common Mistakes:
  • Confusing '+=' with '=' which just assigns
  • Mixing '+=' with '-=' or '*='
  • Thinking '+=' only adds without assignment

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More C Quizzes