Thursday, July 30, 2009

Int a=5,b=0; b= a++ + a++ ; now b=14 why this happends in c++?

is it due to the precedence of operator?

Int a=5,b=0; b= a++ + a++ ; now b=14 why this happends in c++?
Pity no one answered. I was interested to hear the reason.





I haven't used C++ since uni years ago. So I don't remember much.





One thought which is probably wrong (nonsense) is:


Is there a default setting for increments? Could the increment step be set by default to 2 instead of 1?


No comments:

Post a Comment