Computer Science, asked by chiragaggarwal9640, 1 year ago

How many times is a do while loop guaranteed to loop?
ans- 1

Answers

Answered by vijay2019
5
do while loop one time run when condition is false and when comdition is true this work as auther loops.
Answered by Anonymous
6

I know only JAVA sorry :(

A do while loop

A do while loop is a loop which begins without any condition and exits with a condition only. It is an exit controlled loop

Syntax :

do {

--------------------------------

} while(condition)

Answer

Yes it will execute once even if the test condition is false

So the do while loops runs once and it is guaranteed.

Example :

int n=9;

do{

n++;

}while(n<7)

System.out.print(n);

Output

10


Hope it helps :-)

_______________________________________________________________________

Similar questions