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.

User Avatar

Wiki User

13y ago

What else can I help you with?

Related Questions

How do you use loop in C programming?

#include<stdio.h>


What does LOOP stand for?

LOOP is a term used in programming to indicate a programming technique that repeatedly executes the same portion of code until a test condition becomes true.


What is he do loop?

A "do" loop is a construct in a programming language that lets you repeat instructions over and over, as long as a certain condition is true. The details vary, depending on the programming language.


Which loop is also called an exit-condition loop in C programming?

The do while loop is also called an exit condition loop in c, c++, and java.


Is there any rule that if I use an If in a loop then i cant use that if in another loop?

If your question makes sense at all, and it is about programming, then the answer is no.


What is the definition of 'nested' in C programming?

In C a structure within a structure is called nested. For example, you can embed a while loop in another while loop or for loop in a for loop or an if statement in another if statement.


How does a while loop work in programming languages?

A while loop in programming languages repeatedly executes a block of code as long as a specified condition is true. The loop continues to run until the condition becomes false, at which point the program moves on to the next line of code.


What is a loop type?

A Loop is a programming language construct that instructs the processor to repeat a sequence of operations a number of times until a specific condition is reached. There are different types of loops. They are: * for loop * while loop * do while loop


How can I create a knot for loop in my programming code?

To create a knot for loop in programming code, you can use a loop structure that repeats a block of code a specific number of times or until a certain condition is met. This loop allows you to iterate through a sequence of instructions multiple times. You can use keywords like "for" or "while" in languages like Python, Java, or C to implement a knot for loop.


Can you provide an example of how to use a loop variable in a programming language?

In programming, a loop variable is used to control the number of times a loop runs. For example, in Python, you can use a loop variable like "i" in a for loop to iterate over a list of numbers: python numbers 1, 2, 3, 4, 5 for i in numbers: print(i) In this code snippet, the loop variable "i" is used to iterate over each number in the list "numbers" and print it out.


What do mean by structural programming?

Structured programming is a programming paradigm. Prior to structured programming, code was typically written with intertwining jumps or gotos producing "spaghetti" code which is difficult to both read and maintain. Structured programming primarily added subroutines and loop control statements and was later extended by procedural programming which primarily added function calls (not to be confused with functional programming) and which also made exception handling that much easier to maintain. This then led to object-oriented programming.


What is the Difference between while and do while?

Both are programming commands. A do/while loop will execute at least once. A while loop may not execute at all.