answersLogoWhite

0

Why there is need of do while loop in c?

Updated: 8/17/2019
User Avatar

Wiki User

14y ago

Best Answer

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.

User Avatar

Wiki User

14y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Why there is need 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


Why you need a for loop when you have already while loop or do while loop?

We need a for loop because the while and do-while loops do not make use of a control variable. Although you can implement a counter inside a while or do-while loop, the use of a control variable is not as self-evident as it is in a for loop. Aside from the use of a control variable, a for loop is largely the same as a while loop. However, it is quite different to a do-while loop, which always executes at least one iteration of the loop before evaluating the conditional expression. In a for and while loop, the conditional expression is always evaluated before entering the loop, which may result in the loop not executing at all.


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 (<condition>) <statement>


What is iterations in c language?

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