Its
due to order of evaluation of of parameters passed to
printf..
However, it is compiler dependant. And the behaviour of program is
undefined.
Check
this: http://www.scit.wlv.ac.uk/cbook/chap3.order.html
Cheers,
Amol
-----Original Message-----
From: Himanshu Arora [mailto:[EMAIL PROTECTED]
Sent: 26 October 2004 15:41
To: [EMAIL PROTECTED]
Subject: (PT) Check this Program!
#include<stdio.h>
int main()
{
int i=0;
printf("%d ,%d ,%d\n",i,i++,i++);
return 1;
}
Output:
2 ,1, 0
Please tell me why the output of this program is like this.
Bye
Himanshu
To unsubscribe : [EMAIL PROTECTED]
To unsubscribe : [EMAIL PROTECTED]
Yahoo! Groups Sponsor
ADVERTISEMENT
Yahoo! Groups Links
- To reply to this message, go to:
http://groups.yahoo.com/group/Programmers-Town/post?act=reply&messageNum=3661
Please do not reply to this message via email. (more info)
- 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 the Yahoo! Terms of Service.
==============================================================================
This message is for the sole use of the intended recipient. If you received this message in error please delete it and notify us. If this message was misdirected, CSFB does not waive any confidentiality or privilege. CSFB retains and monitors electronic communications sent through its network. Instructions transmitted over this system are not binding on CSFB until they are confirmed by us. Message transmission is not guaranteed to be secure.
==============================================================================
