| | |
Need a little guidance??
![]() |
If x is less than or equal to 5, y is set to 1 -- otherwise y is set to 0; x is then incremented.
But better would be for you to ask, "I think that this statement does [...]. Is this correct?" Or at least provide a (minimal, but complete and compileable) snippet that shows the full context.
But better would be for you to ask, "I think that this statement does [...]. Is this correct?" Or at least provide a (minimal, but complete and compileable) snippet that shows the full context.
"One of the methods used by statists to destroy capitalism consists in establishing controls that tie a given industry hand and foot, making it unable to solve its problems, then declaring that freedom has failed and stronger controls are necessary." --Ayn Rand
•
•
•
•
Originally Posted by Dave Sinkula
If x is less than or equal to 5, y is set to 1 -- otherwise y is set to 0; x is then incremented.
y=x++<=5; is equivalent to y=(x++<=5);.The part inside the brackets should be evaluated first. So doesn't that mean the binary comparison and the ++ should also be evaluated before the assignment?
バルサミコ酢やっぱいらへんで
•
•
•
•
Originally Posted by WolfPack
Is x incremented before or after the result of the comparison is assigned to y?
•
•
•
•
Originally Posted by WolfPack
Correct me if I am wrong in the explaination below.
y=x++<=5;is equivalent toy=(x++<=5);.
The part inside the brackets should be evaluated first. So doesn't that mean the binary comparison and the ++ should also be evaluated before the assignment?
"One of the methods used by statists to destroy capitalism consists in establishing controls that tie a given industry hand and foot, making it unable to solve its problems, then declaring that freedom has failed and stronger controls are necessary." --Ayn Rand
"One of the methods used by statists to destroy capitalism consists in establishing controls that tie a given industry hand and foot, making it unable to solve its problems, then declaring that freedom has failed and stronger controls are necessary." --Ayn Rand
•
•
•
•
Originally Posted by WolfPack
I know that it is done after the comparison. I wanted to know if it was done after or before the assignment.
"One of the methods used by statists to destroy capitalism consists in establishing controls that tie a given industry hand and foot, making it unable to solve its problems, then declaring that freedom has failed and stronger controls are necessary." --Ayn Rand
![]() |
Similar Threads
- unknown harddrive error (Windows NT / 2000 / XP)
- Forms in Random access files (Visual Basic 4 / 5 / 6)
- Writing to an Access Database (Visual Basic 4 / 5 / 6)
- Looking for some Guidance. (Python)
- New to C and needing some guidance (C)
- need a little guidance (Java)
- Problems IE 6 Win98 redirected from google to other site (Web Browsers)
- Querying database records (Visual Basic 4 / 5 / 6)
- Connection Problems (Networking Hardware Configuration)
Other Threads in the C Forum
- Previous Thread: Getting started in MFC, good links?
- Next Thread: serial I/O, check for input
| Thread Tools | Search this Thread |
* adobe ansi api array asterisks binarysearch calculate centimeter changingto char character cm convert copyimagefile cprogramme creafecopyofanytypeoffileinc createcopyoffile csyntax database directory feet fflush fgets file fork forloop frequency function givemetehcodez grade graphics gtkgcurlcompiling gtkwinlinux hacking highest histogram i/o inches infiniteloop input intmain() iso kernel keyboard km linked linkedlist linux linuxsegmentationfault list locate looping loopinsideloop. lowest match microsoft mqqueue mysql number oddnumber odf open opendocumentformat owf pattern pdf performance posix probleminc process program programming radix recv recvblocked repetition research reversing scanf scheduling segmentationfault send sequential socket socketprograming stack standard string systemcall threads turboc unix user variable voidmain() wab whythiscodecausesegmentationfault windows.h windowsapi






