Hi Deo...
try to use bottom pasting in future...
--- deo sharma <[EMAIL PROTECTED]> wrote:
> i thgink the answer should be:
>
> 4 5 5 4 5.
> any way isn't it the answer?
>
> ashwin mittal <[EMAIL PROTECTED]> wrote:
>
>
> --- [EMAIL PROTECTED] wrote:
>
> >
> >
> > --- In [EMAIL PROTECTED], srikanth
> > poojary
> > <[EMAIL PROTECTED]> wrote:
> > > main()
> > > {
> > > int i=5;
> > > printf("%d%d%d%d%d",i++,i--,++i,--i,i);
> > > }
> > >
> > >
> > > what is the o/p and why?
> >
> > Output may be anything and it would be correct.
> See:
> > <http://www.eskimo.com/~scs/C-faq/q3.1.html> and
> the
> > next few questions.
> >
> >
> >
> Hi all,
>
> The Printf expression is compile from Right to
> left...
> So starting from right,
> i,
> --i,
> ++i,
> i--,
> i++
> the sequence goes like this....
>
> So
> i = 5;
> --i = 4;
> ++i = 5;
> i-- = 5;
> i++ = 4
>
>
> But the printf will display the output in that
> sequence in which it is demanded...
> i.e. from left to right...
>
> i++,
> i--,
> ++i,
> --i,
> i
>
>
> Accordingly the values are displayed as such...
> i.e
> 4 5 5 4 5
>
>
> Regards,
> Ashwin Mittal.
>
Yah this is the answer it should be 4 5 5 4 5...
Just read the above paragraph...
regards,
Ashwin Mittal.
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
------------------------ Yahoo! Groups Sponsor --------------------~-->
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/EbFolB/TM
--------------------------------------------------------------------~->
To unsubscribe : [EMAIL PROTECTED]
Yahoo! Groups Links
<*> To reply to this message, go to:
http://groups.yahoo.com/group/Programmers-Town/post?act=reply&messageNum=4869
Please do not reply to this message via email. More information here:
http://help.yahoo.com/help/us/groups/messages/messages-23.html
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/Programmers-Town/
<*> 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/