thnx man, i am really going to enjoy the system dependant answer, seriously i cant wait till she marks it wrong.
thnx man, i am really going to enjoy the system dependant answer, seriously i cant wait till she marks it wrong.
Wrong!!>>Explain the empty for loop
The counter is declared and initialized outside of the loop condition but referenced in conditional statements within the loop.
"Empty" refers to the loop body. It just means that all the "action" is inside the parentheses. An example is:
Some people prefer this style:Code:for( d=2; d < n && n / d != 0; d++ ) ; // exits loop when d is a divisor of n (or d==n)or this:Code:for( d=2; d < n && n / d != 0; d++ ) ;to make it clear that it's not just a mistake.Code:for( d=2; d < n && n / d != 0; d++ ) {};
Another name for this is a Null Statement.
are you sure she's not looking for a relativity answer? as in:
unsigned<float<double
Join is in our Unofficial Cprog IRC channel
Server: irc.phoenixradio.org
Channel: #Tech
Team Cprog Folding@Home: Team #43476
Download it Here
Detailed Stats Here
More Detailed Stats
52 Members so far, are YOU a member?
Current team score: 1223226 (ranked 374 of 45152)
The CBoard team is doing better than 99.16% of the other teams
Top 5 Members: Xterria(518175), pianorain(118517), Bennet(64957), JaWiB(55610), alphaoide(44374)
Last Updated on: Wed, 30 Aug, 2006 @ 2:30 PM EDT
golfinguy4:
Are you sure? I've only seen for(;;); referred to as an infinite loop, same as while(1);
RoD:
Your post wasn't clear. Did teacher give for(;;) as an example?
Last edited by R.Stiltskin; 05-29-2003 at 07:21 PM.
well i asked bout it today and i posted what she said she wanted.
Code:int i = 0; for (; i < 5; i++) { cout << "Runs 5 times!" << endl; }
that just means the LCV is initialized outside the loop...
Join is in our Unofficial Cprog IRC channel
Server: irc.phoenixradio.org
Channel: #Tech
Team Cprog Folding@Home: Team #43476
Download it Here
Detailed Stats Here
More Detailed Stats
52 Members so far, are YOU a member?
Current team score: 1223226 (ranked 374 of 45152)
The CBoard team is doing better than 99.16% of the other teams
Top 5 Members: Xterria(518175), pianorain(118517), Bennet(64957), JaWiB(55610), alphaoide(44374)
Last Updated on: Wed, 30 Aug, 2006 @ 2:30 PM EDT
Missed a couple there... Off the top of my head,98) List the data types and number of bytes each:
I have NO idea what the bytes are, but i listed char, int, double, float, bool, and string cuz we did those.
char, int, short, long (each of which comes in signed and unsigned flavors)
bool, float, double, long double
The word rap as it applies to music is the result of a peculiar phonological rule which has stripped the word of its initial voiceless velar stop.
ya i only listed the ones she actually went over, cs2 sux for us
Well, I don't see how she can call that an empty anything. It's not empty. I see examples like the one I posted and examples like the one golfinguy posted both being called empty loops. They both make sense. I don't see any that look like your teacher's.
But she's marking the test. Too bad. Maybe you can ask her again, & show her our examples, before the test.
Good luck.
Yeah, I'd say Stiltskin's is probably the most correct definition of empty loop... golfinguy's is probably technically an infinite loop, and not empty.
Also, on the structure of a program, I'd put something like this (in no particular order):
Pre-processor
Global-Scope/Namespace-Scope Constants (If your teacher is really picky, I suppose typedefs would go here too)
Function Prototypes
Class Declarations
Class Definitions
Driver (i.e. main)
The word rap as it applies to music is the result of a peculiar phonological rule which has stripped the word of its initial voiceless velar stop.
Yeah, my empty loop was wrong. I misread what he wanted.
well the test is in a few hours, and thnx to you guys im sure i'll pass it, thank ya.
good luck ;-)
Join is in our Unofficial Cprog IRC channel
Server: irc.phoenixradio.org
Channel: #Tech
Team Cprog Folding@Home: Team #43476
Download it Here
Detailed Stats Here
More Detailed Stats
52 Members so far, are YOU a member?
Current team score: 1223226 (ranked 374 of 45152)
The CBoard team is doing better than 99.16% of the other teams
Top 5 Members: Xterria(518175), pianorain(118517), Bennet(64957), JaWiB(55610), alphaoide(44374)
Last Updated on: Wed, 30 Aug, 2006 @ 2:30 PM EDT
110 question study guide, TWO questions on the actual test. god i really hate that $$$$$
And the real test was to see if you could keep your sanity after all that.
The word rap as it applies to music is the result of a peculiar phonological rule which has stripped the word of its initial voiceless velar stop.