No products in the cart.

What is the difference between while …

CBSE, JEE, NEET, CUET

CBSE, JEE, NEET, CUET

Question Bank, Mock Tests, Exam Papers

NCERT Solutions, Sample Papers, Notes, Videos

What is the difference between while loop and do-while loop?  

  • 2 answers

Shubham Pandey 7 years, 2 months ago

While loop is an entry control loop ..while ...do while is an exit control loop

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.

http://mycbseguide.com/examin8/

Related Questions

Case study based question
  • 0 answers
what is palindrone
  • 1 answers

myCBSEguide App

myCBSEguide

Trusted by 1 Crore+ Students

Test Generator

Test Generator

Create papers online. It's FREE.

CUET Mock Tests

CUET Mock Tests

75,000+ questions to practice only on myCBSEguide app

Download myCBSEguide App