increment operator- help me please

ajayfame's Avatar, Join Date: Oct 2010
Newbie Member
please help me with this.....

a=1;

b = a++ + ++a+ ++a;

the output is coming b=7...


can any1 plzz explain
0
jimblumberg's Avatar
Ambitious contributor
This is undefined behavior.
Read Stroustrup's answer to the a++ + ++a FAQ http://www2.research.att.com/~bs/bs_...aluation-order