While do Loop in C++ program

Asked By 20 points N/A Posted on -
qa-featured

What is while do loop and what can be its asset in C program to make a complicated program easy?

SHARE
Best Answer by Hoting Gracia
Best Answer
Best Answer
Answered By 5 points N/A #103029

While do Loop in C++ program

qa-featured

C++ is the programming Language developed from C developed by Dennis Ritchie and now it is the basic for any programming language as major benefits are only with C language.

Loop is defined the execution revolves around until the condition get satisfied and for kloop is majorly used in many programs for smooth execution without errors.
 
Syntax of the do-while loop itself defines us how the loop gets executed by condition as follows..
 
Do
{
this;
and this;
and this;
and this;
}while(this condition is true);
 
Is the syntax for the do while loop.
 
Do-while tests the condition before executing any of the statements present with in the while loop as we can say that do-while loop will execute statements at least once even if condition fails for the first time.
 
Thank You.
Answered By 40 points N/A #103030

While do Loop in C++ program

qa-featured

Hi there ,

First of all it is known as do while loop not while do loop.It comes under the category of exit controlled loop.

There are two types of loop 

1. Entry controlled loop 

2. Exit controlled loop

In entry controlled loop first the test expression is evaluated and the loop iterates if and only if the condition is true or else the loop will terminate and the condition is checked at the beginning before entering the loop.

In exit controlled loop , First the set of actions given is iterated then before the next iteration the condition test is checked and if its true the next iteration begins or if it is false the loop is terminated.

In this the loop is always executed once.

Answered By 20 points N/A #103031

While do Loop in C++ program

qa-featured

TechyV is really great! Now I know what loop is.

Thanks Hoting Gracia and Lesten pasio for you solutions!

Related Questions