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, 9 months ago
- 2 answers
Naveen Sharma 7 years, 9 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 Sameeha _ 3 months, 4 weeks ago
- 0 answers
Posted by Jaysundar Vc 5 months, 1 week ago
- 0 answers
Posted by Manasvi Bhutada 5 months ago
- 1 answers
Posted by Catherine Tympuiñ 4 months, 1 week ago
- 0 answers
Posted by Sanchi Kohati 4 months, 2 weeks ago
- 0 answers
Posted by Payal Kumari 8 months, 2 weeks ago
- 0 answers
Posted by S A 4 months, 3 weeks ago
- 0 answers
Posted by Catherine Tympuiñ 4 months, 1 week ago
- 1 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, 9 months ago
While loop is an entry control loop ..while ...do while is an exit control loop
0Thank You