0
Stupid question from a beginner
Why a is 12 and b is 13? https://code.sololearn.com/WbRSnoR3y7Oi/?ref=app
1 Réponse
+ 7
You should know about pre and post increment, and pre and post decrement to understand your problem.
a=13;
b=a--; // here a value is first assigned to b then a is decremented, since it is a post decrement operation.
So b will be 13.
But now a is decremented so when you print, it will result in 12.