posted 16 years ago
int the line
int i =x++ + ++x ; i = 4
because according to operator precedence ++x evaluates to 2 and then x++ again to 2 thus giving output i=4 and x = 3
but
int i = x++ + x++ the output is x=3 i=3
could some one explain me how it got evaluated to the above output.