unexpected result



hi
look at this code

include <stdio.h>
int main(void)
{
int i,j=2;
i=j++ * ++j * j++;
printf("%d %d",i,j);
return 0;
}

acc. to me the values of i & j are 27,5 respectively & rightly so as i


ran this on turbo c++ compiler but if i ran this on lcc-win32 compiler


i got 32 & 5 for i & j respectively.
why this is so

.



Relevant Pages

  • Re: Unused arguments
    ... jacob navia said: ... I am considering extending the lcc-win32 compiler to accept ... int fn ...
    (comp.lang.c)
  • Re: Unused arguments
    ... I am considering extending the lcc-win32 compiler to accept ... int fn ... My approach is to propose a GC, that solves the memory management problem in a much more elegant way without the constructors/destructors ... without any preconceived "programming model" behind it. ...
    (comp.lang.c)
  • Re: Unused arguments
    ... I am considering extending the lcc-win32 compiler to accept ... int fn ... Some features are neat, as you see, and I have added ... reliable as explicit memory management by a careful programmer. ...
    (comp.lang.c)
  • Re: Unused arguments
    ... jacob navia wrote: ... I am considering extending the lcc-win32 compiler to accept ... int fn ...
    (comp.lang.c)
  • Re: Unused arguments
    ... jacob navia wrote: ... I am considering extending the lcc-win32 compiler to accept ... int fn ...
    (comp.lang.c)