When I compile following code it gives different output in different environment.
int a=4; a = ++a + ++a; printf("%d",a);
compiling this in Dev-C++ gives 12 while in xcode LLVM compiler it gives 11 as output.
Also when I compile following code
int a=4; a = ++a + ++a + ++a; printf("%d",a);
it gives 19 in Dev-C++ and 18 in xcode LLVM compiler.
Can anyone explain me more about this?