loops Flashcards
1
Q
while loop
A
while expression is true keep repeating the code
2
Q
do-while loop
A
repeat until the expression become false. expression always checked at the end of the loop
POST TEST LOOP
3
Q
for loop
A
for(initial cond;loop continue bool; action AFTER iteration)
4
Q
break
A
break used to terminate loop whereever needed
5
Q
continue
A
continue skips the rest of code and starts new iteration