Home » C++ Programming » Operators » Question
  1. Pick out the compound assignment statement.
    1. p = p / q
    2. p -= 6
    3. p = p – 6
    4. All of above
    5. None of these
Correct Option: B

When we want to modify the value of a variable by performing an operation on the value currently stored, We will use compound assignment statement. In this option, p -=6 is equal to p = p-6.



Your comments will be displayed only after manual approval.