loops Flashcards

1
Q

while loop

A

while expression is true keep repeating the code

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

do-while loop

A

repeat until the expression become false. expression always checked at the end of the loop

POST TEST LOOP

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

for loop

A

for(initial cond;loop continue bool; action AFTER iteration)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

break

A

break used to terminate loop whereever needed

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

continue

A

continue skips the rest of code and starts new iteration

How well did you know this?
1
Not at all
2
3
4
5
Perfectly