answersLogoWhite

0

A condition-controlled loop is one that has an indefinite number of iterations; its opposite is the count-controlled loop. Condition-controlled loops execute until some event occurs, which is usually user-initiated. For example, modern programs run an condition-controlled loop similar to the following:

while(GetMessage(message,hwnd,0,0)) { ... }

This loop continues to execute until there are no messages left (the WM_QUIT message is returned, which has a value of zero).

It is impossible to identify before execution the number of times such a loop will run, except during controlled tests, although you can easily identify what conditions will cause it to terminate.

What else can I help you with?

Related Questions

When would you use a count controlled loop vs. a flag controlled loop?

Counter Loop:Counter loop is a loop which executes statement up to a fixed number of time.In GW FOR ... NEXT loop is used as counter loop.Controlled Loop:Controlled loop is used to extend the statements till a specific condition is satisfied. In GW WHILE ... WEND is used as controlled loop.


What are the differences between a condition-controlled loop and a count-controlled loop?

A Condition-Controlled loop keeps going until a certain condition is met, like say the user clicks a button, or the world ends or something. A Counter controlled loop keeps going until it has run a certain number of times. For example if you create a variable x=0. And then every time your look runs you increase x by 1 (x=x+1), you can tell your loop to keep running until x=5. That way the loop would run 5 times until the *COUNTER* reaches 5. This would be a counter controlled loop


What is a sentinel controlled repetition?

A sentinel-controlled repetition is a loop structure where the continuation of the loop is determined by a special condition called a sentinel value. When the sentinel value is encountered, it signals the end of the loop. This allows the loop to run until a specific condition is met, rather than for a predetermined number of iterations.


What is the difference between entry and exit controlled loops - in Java?

while loop and for loop are entry controlled loops as they check looping condition at the entry point. do while loop is exit controlled loop as it checks looping condition at exit point. shreeradha@yahoo.com


How do you convert a while loop to a do loop?

input:while (condition) statementoutput:for (;condition;) statementor, if you mean do-while:do { if (condition) statement } while (condition);


What is for looping in c language?

The for loop is another entry-controlled loop that provides a more concise loop control structure.The general form of the for loop isfor( initialization ; test condition ; increment ){body}Generally this loop is used when the either the no. of loops or the looping condition or the end condition is known.Ex.to count n no. of integers.Hope this will help.


What does a count-controlled loop mean in programming?

A condition-controlled loop is one that has an indefinite number of iterations; its opposite is the count-controlled loop. Condition-controlled loops execute until some event occurs, which is usually user-initiated. For example, modern programs run an condition-controlled loop similar to the following: while(GetMessage(message,hwnd,0,0)) { ... } This loop continues to execute until there are no messages left (the WM_QUIT message is returned, which has a value of zero). It is impossible to identify before execution the number of times such a loop will run, except during controlled tests, although you can easily identify what conditions will cause it to terminate.


What do you mean by loop check?

A loop check is a condition that is checked everytime a loop is executed. It is usually the condition that needs to match for the loop to terminate. Until this condition is matched the loop will continue to execute. Ex: for(int i=0; i<10; i++) { … } In the above for loop "i<10" is the loop check condition and this loop will execute until the value of i is less than 10. It starts at 0 and gets incremented by 1 everytime the loop completes an iteration of execution


What do you mean by check?

A loop check is a condition that is checked everytime a loop is executed. It is usually the condition that needs to match for the loop to terminate. Until this condition is matched the loop will continue to execute. Ex: for(int i=0; i<10; i++) { … } In the above for loop "i<10" is the loop check condition and this loop will execute until the value of i is less than 10. It starts at 0 and gets incremented by 1 everytime the loop completes an iteration of execution


What is the name of the part of the parenthesis of a for-loop that terminates the loop?

The part of the parentheses in a for-loop that determines when the loop terminates is called the termination condition or loop condition. This condition is evaluated before each iteration, and if it evaluates to false, the loop stops executing. For example, in a loop structured as for (initialization; condition; increment), the "condition" is the termination condition.


Is a while loop a pre-condition or post condition?

The while loop is a pre-condition loop.  It tests the condition at the beginning of each loop, executes the loop if it is true, and goes back to the test after executing each iteration.


Compare Do-While with While Statements?

A Do-While loop looks like this: do { loop body } while (condition); and a While loop looks like this: while (condition) { loop body } The main difference is that the loop body is always run once in the Do-While loop, then the condition is checked to see if the loop should keep running. In a While loop, the condition is checked first, and it will not run the loop body at all if the condition is false.

Trending Questions
What are two Database management systems products that run under the Linux operating system? Will DDR3 graphics card work on HP dc7900 desktop? What is ocr level 2 literacy equivilant to? What is the difference between terminal and X11 on mac? Are all permissions stored in the access control list of the element being protected? What is Micorsoft Word Excel? Does anyone have a list of stores in orange county that will pay cash for a laptop with a broken screen? What can I do if I was hacked on AQW? Which word in English has got the maximum synonyms and how many? What is the link between ml and liters? What is halfway between NJ and Ann Arbor mi? Is micrsoft office 2010 compatible with lotus notes? If you take any pitch on the keyboard the next occurrence of the same letter name going towards the left (down) will vibrate? Put a long stick into a glass half filled with water observe the top view and side view of the glass and make a drawing of both views with descriptions notice the refraction of light? Where can you find a free and safe animation program where you animate your own drawings? What does a WEP do and why should it not be implemented in a wireless network? Im looking to sell my 1st generation 8gb iPod touch on eBay my friend said it should be put on for about 120 pound but im not sure anyone got any suggestions? Why would a computer use a translator program? When was Robert Palmer - computer businessman - born? What is halfway point between Birmingham Alabama and Elkin North Carolina?