answersLogoWhite

0


Best Answer

To repeatedly perform the logic inside the loop while the condition holds true (you would expect something inside the code block to eventually cause the test condition to evaluate as false).

Most basic examples given in text books use an incrementing variable which could also be implemented as a for loop:

int i = 0;

do {

i++;

} while (i < 100);

A better example would be:

bool door_opened;

do {

door_opened = ring_doorbell(); /* an example function*/

} while (door_opened == false);

PS its probably 10 years since I wrote any C so syntax might not be 100% accurate.

User Avatar

Wiki User

12y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

12y ago

Nothing.

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is the limitations of do while loop in c?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

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 do while loop in c is exit controoled loop?

yes


What are the differences between Do While and For loops in C?

In short, a for loop declares an variable and assigns it a value, has an argument, and has an update. A while loop only has an argument. More Detail... in C++, which is very close to C an example while loop is; while(i


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.


Do-while loop in c?

Available.


What is the difference between a do while loop and a for loop in c?

the counter variable cannot be initialized in while loop before entering into the block.


Where do you get loop the loop straws?

C, for loops, while loops, and do while loops are control structures forFor example, the following programs are functionally identical: While loop


How do you use switches in c?

do WHILE loop defination


Is for loop is faster than while loop in turbo c plus plus compiler?

No, why did you think so?


Why you use while function in c?

It is a statement; you can create a loop with it: while (&lt;condition&gt;) &lt;statement&gt;


What is iterations in c language?

An iteration is an instance of a structured loop statement (for, while or do-while).


Why there is need of do while loop in c?

Not all programmers will be comfortable with a "do-while" loop, just as not all programmers will be comfortable with the "for(;;)" loop.Both are provided for your individual preference.