Possible Duplicate:
Undefined Behavior and Sequence Points
i am wondering from the ending result between this 2 chunk of code one in c++ other in c#. these two chunks give differents result which doesnt make any sense any explanation will be helpful.
//c++
int x=0;
x=x++ + ++x;// result=3
//c#
int x=0;
x=x++ + ++x;// result=2 (logical answer)