Chapter5_Voc2

Réussis tes devoirs et examens dès maintenant avec Quizwiz!

a sentinel

A special value that marks the end of a list of values

a conditional loop

The loop that executes as long as a particular condition exists

a while loop

This is a conditional loop, pretest, repeats as long as a particular condition exists. It is ideal for situations where you don't want the loop to iterate if the condition is false from the beginning.

a for loop

This is a pretest loop that has a built-in expressions for initializing, testing and updating. It is ideal for performing a known number of iterations.

a do while loop

This loop is a conditional loop, but posttest, which means its express is tested after each iteration. It is ideal in situations where you always want the loop to iterate as least once.

a nested loop

This loop is inside another loop.

a count-controlled loop

This loop repeats a specific number of times

continue

This statement causes a loop to stop its current iteration and begin the next one.

a break

This statement causes a loop to terminate early.

Two categories of loops

a conditional loop and a count-controlled loop

loop

a control structure that causes part of a program to repeat

a counter

a variable that is regularly incremented or decremented each time a loop iterates

infinite loop

not having a way of stopping

postfix mode

the operator is placed after the variable

prefix mode

the operator is placed before the variable name

while loop format

while (expression) statement;

three loops

while loop, do while loop and for loop

three loops

while loop, do-while loop, for loop


Ensembles d'études connexes

3.2 - policies provisions, options, and riders

View Set

Early Childhood Education 5025 Praxis Practice

View Set

MS2 Final Exam Coursepoint Review Questions

View Set

Chapter 34: Assessment and Management of Clients with Inflammatory Rheumatic Disorders

View Set

Speech Ch. 10-19 Review Questions

View Set