unexpected result
- From: "ashu" <riskyashish@xxxxxxxxx>
- Date: 8 Mar 2006 01:02:53 -0800
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
.
- Follow-Ups:
- Re: unexpected result
- From: AnonMail2005
- Re: unexpected result
- From: John Tsiombikas (Nuclear / Mindlapse)
- Re: unexpected result
- From: srikanth
- Re: unexpected result
- From: Keith Thompson
- Re: unexpected result
- From: Grumble
- C and memory help.
- From: novice
- Re: unexpected result
- From: Chris Dollin
- Re: unexpected result
- From: Ankur
- Re: unexpected result
- Prev by Date: Strange behaviour of long long and unsigned int
- Next by Date: Re: unexpected result
- Previous by thread: Strange behaviour of long long and unsigned int
- Next by thread: Re: unexpected result
- Index(es):
Relevant Pages
|