0
++a?
How work Int a =10, b; b = ++a+a; cout << b; I don't remember lessons about ++a, only a++.
6 Answers
+ 3
int a=10;
cout<< ++a + a<<endl; // 11+11=22, increments value first then uses it value next,
cout<<a; //11
a=10;
cout<< a++ + a <<endl; //10+11=21 , first it's value uses in print and increments next.
cout<<a; //11
edit:
if there is sequence point issue, then output is compiler dependent because output is undefined by standards.
+ 1
++a means that value of a is changed by one before rest of the line runs. Your code means the same as
int a=10,b;
a++;
b=a+a;
cout<<b;
+ 1
It is in this lesson
https://www.sololearn.com/learning/1610/
0
Sorry, don't understand