| | |
wht will be the o/p?
![]() |
•
•
•
•
#include <stdio.h>
int main()
{
int i=5;
printf("%d %d %d %d %d", --i,i--,++i,--i,i);
return 0;
}
Last edited by Aia; Sep 28th, 2007 at 6:32 pm.
That would be a completely different program, which is fine.
Use that FAQ to also look up "sequence points". You'll see that each side effect is separated by a sequence point, so there is no issue about the order of things and your program is well defined.
But to say it always has the same output as the one-liner in the original post would be wrong.
Use that FAQ to also look up "sequence points". You'll see that each side effect is separated by a sequence point, so there is no issue about the order of things and your program is well defined.
But to say it always has the same output as the one-liner in the original post would be wrong.
![]() |
Similar Threads
- Wht's the newest ver of VB.net studio (VB.NET)
- Microsoft SMS vs. novadigm software and other software (Windows Software)
- Recommended Web Hosts (Web Hosting Deals)
- Forum lurkers, introduce yourself ... !! (Community Introductions)
- win 98 (Windows 95 / 98 / Me)
- Active Directory (Windows NT / 2000 / XP)
- 98, ME, and XP have problems seeing each other (Networking Hardware Configuration)
- Windows 2000 Debug file (Windows NT / 2000 / XP)
- StorageTek Tape library upgrade (Windows NT / 2000 / XP)
Other Threads in the C Forum
- Previous Thread: Count words in a C program
- Next Thread: changing values of a struct
| Thread Tools | Search this Thread |
#include adobe api array arrays asterisks binarysearch calculate char cm copyimagefile copypdffile cprogramme creafecopyofanytypeoffileinc createcopyoffile csyntax database directory dynamic execv feet fflush fgets file fork forloop frequency getlasterror givemetehcodez global grade graphics gtkgcurlcompiling hacking hardware highest homework i/o include incrementoperators infiniteloop input interest kernel keyboard kilometer linked linkedlist linux linuxsegmentationfault list lists locate logical_drives looping loopinsideloop. match matrix meter microsoft motherboard mqqueue mysql number odf opensource owf pattern pdf performance pointer posix probleminc process program programming pyramidusingturboccodes radix recursion recv repetition research scanf scripting segmentationfault sequential shape socket socketprograming stack standard string systemcall threads turboc unix user voidmain() wab windows.h






