Possible Duplicate:
Could anyone explain these undefined behaviors (i = i++ + ++i , i = i++, etc…)
Is there any difference between the Java and C++ operators?
Why unary operators give different result in c++ and java?
Check this out:
int i = 1;
i = i++ + ++i;
print i (with cout or println)
In java: prints 4
In c++: prints 5
Why ?