x = x + 5;Which statement is equivalent?
- A
x++ 5;
- B
++x = 5;
- Ccheck_circle
x += 5;
- D
x =+ 5;
Explanation
The compound assignment x += 5 is shorthand for x = x + 5.
AP Computer Science A· difficulty 2/5
x = x + 5;Which statement is equivalent?
x++ 5;
++x = 5;
x += 5;
x =+ 5;
Explanation
The compound assignment x += 5 is shorthand for x = x + 5.
Want 10 more like this — adaptive to your weak spots?