Please tell the compiler you are using because i have found the resuly coming out as : 6 6 I suppose this behaviour to be compiler dependant. I am using Dev-C++ a GCC version for windows. This must be so in Linux as well since it is also having GCC by default. Regards, Debasish
<html><DIV> <P><FONT face="Lucida Handwriting, Cursive" color=#ff9900 size=2>Karmennavava Dhikaraste, Maaphaleshu Kadaachanah</FONT></P></DIV></html> From: manju arumugam <[EMAIL PROTECTED]> Reply-To: [email protected] To: [email protected] Subject: Re: [c-prog] help in the logic Date: Wed, 7 Feb 2007 12:46:21 +0000 (GMT) Both statement having the i value is 6 only, ++i is pre increment and i++ is post increment, what is the doubt in this sharma_anish9188 <[EMAIL PROTECTED]> wrote: I cant understand the logic can anybody help me to under stand int i=5; printf("%d",++i); = 6 printf("%d",i++); = 5 how? [mod - I assume you mean only one of those printf()'s, not the two in series as you've presented it - have a look at http://www.google.com/search?hl=en&q=postincrement+preincrement+C+difference&btnG=Google+Search - PJH] --------------------------------- Heres a new way to find what you're looking for - Yahoo! Answers _________________________________________________________________ Latest updates from the world of sports http://content.msn.co.in/Sports/Default To unsubscribe, send a blank message to <mailto:[EMAIL PROTECTED]>. Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/c-prog/ <*> Your email settings: Individual Email | Traditional <*> To change settings online go to: http://groups.yahoo.com/group/c-prog/join (Yahoo! ID required) <*> To change settings via email: mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
