0
37kviews
Explain difference between while and do-while loop.
1 Answer
0
71views
While loop Do..While Loop
Syntax:,while(condition),{ Syntax:,do,{
} }while(condition);
Semicolon (;) is not used Semicolon (;) is used
Condition is checked first. Condition is checked later.
Since condition is checked first, statements may or may not get executed. Since condition is checked later, the body statements will execute at least once.
The main feature of the while loop is,its an entry controlled loop. The main feature of the do while loops is it is an exit controlled loop
enter image description here enter image description here
enter image description here enter image description here
from 1 to 50. -
Please log in to add an answer.