Below is a simple program.
int i = 0;
printf("%d %d %d %d", i++, i==1, i, ++i)
Its giving this output:
On Sun Solaris 8:
0 1 2 2
On Linux:
1 1 1 1
On Windows:
0 1 1 2
Can any one explain me how the compiler behaves in any particular case. I know the code is compiler dependent. Lets assume on...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.