| | |
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 |
#include adobe ansi api array asterisks binarysearch changingto char character cm copyimagefile cprogramme creafecopyofanytypeoffileinc createcopyoffile csyntax database directory dynamic execv feet fgets file fork forloop frequency function getlasterror givemetehcodez global grade graphics gtkgcurlcompiling hacking hardware highest histogram i/o include incrementoperators infiniteloop input interest kernel keyboard kilometer license linked linkedlist linux linuxsegmentationfault list locate logical_drives looping loopinsideloop. lowest match matrix meter microsoft motherboard mqqueue mysql number odf opensource owf pattern pdf performance pointer posix probleminc process program programming radix recursion recv repetition research reversing scanf segmentationfault sequential shape socket socketprograming standard string systemcall threads turboc unix user voidmain() wab windows.h windowsapi






