What is the difference between while …
CBSE, JEE, NEET, CUET
Question Bank, Mock Tests, Exam Papers
NCERT Solutions, Sample Papers, Notes, Videos
Posted by Neha Barnwal 7 years, 2 months ago
- 2 answers
Naveen Sharma 7 years, 2 months ago
Ans. The difference is in when the condition gets evaluated.
In a do-while loop, the condition is not evaluated until the end of each loop. That means that a do- while loop will always run at least once.
In a while loop, the condition is evaluated at the start. So while loop will run only when condition is true.
Related Questions
Posted by Jeevika . R 2 months, 3 weeks ago
- 0 answers
Posted by S. Giri 2 months, 3 weeks ago
- 1 answers
Posted by Kirti Sharma 2 months ago
- 1 answers
Posted by Vanshika Prajapati 1 month, 3 weeks ago
- 1 answers
Posted by Rupesh Rupesh 1 month, 2 weeks ago
- 1 answers
Posted by Vikas Tudu 2 months ago
- 2 answers
Posted by Payal Kumari 1 month, 1 week ago
- 0 answers
myCBSEguide
Trusted by 1 Crore+ Students
Test Generator
Create papers online. It's FREE.
CUET Mock Tests
75,000+ questions to practice only on myCBSEguide app
Shubham Pandey 7 years, 2 months ago
While loop is an entry control loop ..while ...do while is an exit control loop
0Thank You