0
Can someone ecplain why the outcome is like that
https://code.sololearn.com/cEnmdBcZjVUq/?ref=app so i made a code about it but have a hard time making a 100% answer just base on the outcome so i have to ask just to make sure. thank you
2 Answers
+ 3
1) int a = 3; //a=3
2) int b = a++; //b=3;a=4
3) int c = ++a; //c=5;a=5
4) int d = a++; //d=5;a=6
Which step you don't understand?
0
what i'm thinking is that it should add only on what is called? but i guess not... a++ should always be 4 something like that I guess I was sleepy when i tried to understand it.. i got it now thank you