+ 12
What is the value of += in C++
3 Réponses
+ 9
x+=y
==> x=x+y
+ 6
+= is an operator in C++
It's syntax is,
x+=2; //or any other number
//It's the same as... x=x+2;
or
x+=y;
//It's same as ... x=x+y;
+ 2
+= is used in C++ as Assignment operator.
here = is an assignment operator .
we can use it like this :-
int var=10;
vat+=5;
now it will add 5 in the variable var .
that means var=var+5;