Multiple choice

Which of the following is the correct form of C++ statement using C++ short hands and the C++ statement is x = x+7?

  1. x+7=x

  2. x+=7

  3. x+x=7

  4. None of these

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

This is the correct use of short hand operator to increment the variable on the left-hand side with some particular value.