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, 9 months ago

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

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.

http://mycbseguide.com/examin8/

Related Questions

Define packages
  • 0 answers
Write a program for swapping two numbers?
  • 0 answers
What is alu
  • 1 answers
Write a program for swapping two numbers
  • 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