hey...i want to understand how following code works :
int x=1;
printf("%d%d%d",x,++x,x);
OUTPUT: 222
also
int x=1;
printf("%d%d%d",x,++x,x++);
OUTPUT: 221
actually these o/p are produced when i use visual c++ compiler but when i wrote the same commands in turbo c they gave perfectly understandable o/p as 221 and331 respectively...so maybe there is a compiler problem or something...hoping someone can throw more light into this