answersLogoWhite

0

What is the difference between dowhile loop dountil?

Updated: 8/16/2019
User Avatar

Wiki User

14y ago

Best Answer

A do-while loop checks its termination condition before each iteration, including the first; a do-until checks after each iteration, so that the first iteration occurs before the first check. The C language uses the word "while" for both types of loop, using the placement of the condition to control its timing:

C do-while:

while (condition) { /* condition checked before first loop iteration */

... loop contents

}

C do-until:

do {

... loop contents

} while (condition); /* condition not checked until after first loop iteration */

User Avatar

Wiki User

14y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is the difference between dowhile loop dountil?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Is a DOWHILE loop more flexible than a dountil loop?

No, they are equivalient. DO something WHILE condition; does the same thing as DO something UNTIL NOT condition;


What is the difference between while dowhile?

While: If we can use while statement it will check the condition then proceed further loop statement.DoWhile: If we use dowhile, first execute loop statement then check the condition.


What is difference between while and dowhile?

the test condition will be checked first after wards the body of the loop will be excuted in while statement and the the do while statement represented the body of the loop will be executed first and then the test condition will checked next


List out the differences between while and dowhile statement?

The do ..while loop is executed at least once, whereas the while loop may not be executed even once.


What is unique about a DOWHILE loop?

A DO-WHILE loop will always execute at least one iteration of the loop body. This is because the condition that controls the loop comes at the end of the loop, rather than at the beginning as per a WHILE or FOR loop.


What is the difference between a loop and a whorl fingerprint?

That a loop is curved and a whorl is shaped like a wave.


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.


What is the difference between a loop pedal and a delay pedal?

A Loop pedals recorded sound does not fade (decay).


What are the difference between a wire loop and a wire needle?

ewan ko


Open loop and close loop system in injection moluld machine?

loop checking is perform before cable termination..the difference between a close loop and open loop is,tha close loop has a feedback while the open loop has not.


What is a dowhile statement in C programming?

"do statement while (...);" is a loop which does at least one iteration even if the condition after while is false. When, for instance, "while(...) statement" does not iterate at all if the condition after while is false.


What is difference in close loop and an open-loop control?

no difference that's the difference