+ 3
What is x+= ?
int x = 0; x+=3; It's x + 3? And the x is a result?
5 Answers
+ 13
It is a shorthand version of:
x = x + 3
So then if x = 1
x = x + 3 equals 4.
+ 13
it is short hand of x = x + 3
if x = 0 and x = x + 3 then x = 3
+ 9
Just to add to James answer about increment operators (?), they are ++ and --
If you need to read more about them, you can find information here.
https://en.m.wikipedia.org/wiki/Increment_and_decrement_operators
+ 7
Just a cautionary note, sometimes the pre and post increment operators can have unexpected results
and what does:
x[i]=i++ + 1;
do
Read here:http://www.angelikalanger.com/Articles/VSJ/SequencePoints/SequencePoints.html
0
x+=2