0

# increment operator

Cam someone explain me what does this "+=" do ?

4 Answers

+ 2

It's equivalent to adding the current value of whatevers on the left side of the equal sign by whatever is on the right side of the equal sign.
Example/
int x = 5;
x += 10;
This is equivalent to writing:
int x = 5;
x = x + (10);
So x will become 15 in both cases.

+ 2

x+=y means x=x+y;
x-=y means x=x-y;
x*=y means x=x*y;
x/=y means x=x/y;

+ 2

you're welcome

+ 1

tanks

Hot today

Free month of PRO subscription

12 Votes

Please help me with HTML

0 Votes

Unable to overload +

2 Votes

What is the mistake here?

2 Votes

Struggling to learn

2 Votes

Hey! [SOLVED]

0 Votes

Pls rectify the errors.

1 Votes