2-Looping Flashcards
1
Q
While Loop
A
Repeats a statement or group of statements while a given condition is true; can execute 0…n times
2
Q
For loop
A
Allows you to efficiently write a loop that needs to execute a specific number of times; a valid implementation may contain only two semi-colons
3
Q
do…while loop
A
is guaranteed to execute at least one time
4
Q
Nested loops
A
One or more loops inside any other while, for, or do…while loop
5
Q
Break
A
Terminates the loop or switch statement and transfers execution to the statement immediately following the loop or switch
6
Q
Continue
A
Causes the loop to skip the remainder of its body and immediately retest its condition prior to reiterating
7
Q
Goto
A
Transfers control to the labeled statement