+ 12

What is the value of += in C++

14th Mar 2018, 1:25 PM
Arpit Mittal
Arpit Mittal - avatar
3 Réponses
+ 9
x+=y ==> x=x+y
14th Mar 2018, 1:31 PM
Gaurav Agrawal
Gaurav Agrawal - avatar
+ 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;
14th Mar 2018, 1:35 PM
Akshat Vira
Akshat Vira - avatar
+ 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;
15th Mar 2018, 7:32 AM
Shashank Dubey
Shashank Dubey - avatar