SlideShare a Scribd company logo
What is do while loop?
The body of do while loop is executed at least once.
Only then, the test expression is evaluated.
The do while loop is similar to the while loop with one
important difference.
do {
statement(s);
}while(condition);
Syntax
This executes at least once no
matter the condition is true or
false.
do while loop body
true
false
condition
Example on
do while loop!!
Properties of do while loop
1. It is also called as post tested loop. It is used when it is necessary to execute the loop at least
one time.
2. If there is only one statement in the loop body then braces is optional.
3. Running a do while loop without a body is possible.
4. We can have more than one conditional expression in do while loop.

More Related Content

PPTX
STATEMENT’S AND LOOP’S
PPTX
What is recursion?
PPTX
What is while loop?
PPTX
What is loops? What is For loop?
PPTX
What is Switch Case?
PPTX
What are conditional statements?
PPTX
What are operators?
PPTX
What is Non-primitive data type?
STATEMENT’S AND LOOP’S
What is recursion?
What is while loop?
What is loops? What is For loop?
What is Switch Case?
What are conditional statements?
What are operators?
What is Non-primitive data type?

More from AnuragSrivastava272 (6)

PPTX
What is Data Types and Functions?
PPTX
What is Variables and Header files
PPTX
What is IDE?
PPTX
What is Platform Dependency?
PPTX
What is Computer Language?
PPTX
What is Language?
What is Data Types and Functions?
What is Variables and Header files
What is IDE?
What is Platform Dependency?
What is Computer Language?
What is Language?
Ad

Recently uploaded (20)

PDF
2.FourierTransform-ShortQuestionswithAnswers.pdf
PDF
Supply Chain Operations Speaking Notes -ICLT Program
PPTX
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
PPTX
PPH.pptx obstetrics and gynecology in nursing
PDF
Pre independence Education in Inndia.pdf
PPTX
master seminar digital applications in india
PDF
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
PDF
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
PPTX
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
PDF
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
PDF
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
PPTX
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
PDF
Sports Quiz easy sports quiz sports quiz
PDF
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
PPTX
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
PDF
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
PDF
Computing-Curriculum for Schools in Ghana
PPTX
Institutional Correction lecture only . . .
PDF
Insiders guide to clinical Medicine.pdf
PPTX
Lesson notes of climatology university.
2.FourierTransform-ShortQuestionswithAnswers.pdf
Supply Chain Operations Speaking Notes -ICLT Program
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
PPH.pptx obstetrics and gynecology in nursing
Pre independence Education in Inndia.pdf
master seminar digital applications in india
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
Sports Quiz easy sports quiz sports quiz
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
Computing-Curriculum for Schools in Ghana
Institutional Correction lecture only . . .
Insiders guide to clinical Medicine.pdf
Lesson notes of climatology university.
Ad

What is Do while loop?

  • 1. What is do while loop?
  • 2. The body of do while loop is executed at least once. Only then, the test expression is evaluated. The do while loop is similar to the while loop with one important difference.
  • 3. do { statement(s); }while(condition); Syntax This executes at least once no matter the condition is true or false.
  • 4. do while loop body true false condition
  • 6. Properties of do while loop 1. It is also called as post tested loop. It is used when it is necessary to execute the loop at least one time. 2. If there is only one statement in the loop body then braces is optional. 3. Running a do while loop without a body is possible. 4. We can have more than one conditional expression in do while loop.