-
Junior Member
c program concept..
hi frnds..
looking a very simple program...when you analyse out put must be
45545....
but the same program you run on the PC(microsoft visula c++ tool) it will show out put
55545..
why ?
can any body help me on this occasion ?
void main()
{
int i;
printf("%d%d%d%d%d",i++,i--,++i,--i,i);
getch();
}
-
Contributing Member
Re: c program concept..
I can only assume that there is an order of precedence here. I'm just not sure if its adding everything first and then incremeting it or v.s.
I have attached two url's that go on about this in a little more detail.
http://www.embedded.com/shared/prin...ticleID=9900607
http://www.adp-gmbh.ch/blog/2005/march/17.html
---------------------------
suresh
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules