>and then why does this code in java prints 1?????
i 'm sorry i mentioned java in c forum..but here's my doubt!!
I think it's better to ask this in the Java forum.
According to your doubt: i=i++;
, as the link in Dave Sinkula's post mentions:
it's an undefined expression, so the result can differ from implementation to implementation.
For example, on my and on your compiler your program gave the same output, but it isn't guaranteed that this program will produce the same output on every implementation.