Deck 5: Control Structures II Repetition

Full screen (f)
exit full mode
Question
How do you avoid an infinite loop?
Use Space or
up arrow
down arrow
to flip the card.
Question
The loop control variable for a while loop must be initialized before the while loop.
Question
The expression in a while loop checks whether a variable, called the ____________________, satisfies certain conditions.
Question
A(n) ____________________ is an arbitrary value that, when read, stops the execution of a loop.
Question
How many times does the initial statement of a for loop execute?
Question
A semicolon at the end of a for statement is a semantic error.
Question
What is the purpose of the third expression of the for statement?
Question
If the loop condition in a for statement is omitted, it is assumed to be false.
Question
What does these terms refer to:

- \gg Counter-controlled while loop:
Question
What does these terms refer to:

- \gg Decision maker:
Question
What does these terms refer to:

- \gg Divisor:
Question
What does these terms refer to:

- \gg End-of-file (EOF)-controlled while loop:
Question
What does these terms refer to:

- \gg Fibonacci number:
Question
What does these terms refer to:

- \gg Fibonacci sequence:
Question
What does these terms refer to:

- \gg Flag variable:
Question
What does these terms refer to:

- \gg Flag-controlled while loop:
Question
What does these terms refer to:

- \gg for loop (indexed loop):
Question
What does these terms refer to:

- \gg for loop control variable:
Question
What does these terms refer to:

- \gg Infinite loop:
Question
What does these terms refer to:

- \gg Loop control variable (LCV):
Question
What does these terms refer to:

- \gg Nesting:
Question
What does these terms refer to:

- \gg Posttest loop:
Question
What does these terms refer to:

- \gg Pretest loop:
Question
What does these terms refer to:

- \gg Sentinel:
Question
What does these terms refer to:

- \gg Sentinel-controlled while loop:
Unlock Deck
Sign up to unlock the cards in this deck!
Unlock Deck
Unlock Deck
1/25
auto play flashcards
Play
simple tutorial
Full screen (f)
exit full mode
Deck 5: Control Structures II Repetition
1
How do you avoid an infinite loop?
Verify that the loop's body contains statement(s) that assure the exit condition will eventually be false.
2
The loop control variable for a while loop must be initialized before the while loop.
True
3
The expression in a while loop checks whether a variable, called the ____________________, satisfies certain conditions.
loop control variable (LCV)
loop control variable
LCV
4
A(n) ____________________ is an arbitrary value that, when read, stops the execution of a loop.
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
5
How many times does the initial statement of a for loop execute?
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
6
A semicolon at the end of a for statement is a semantic error.
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
7
What is the purpose of the third expression of the for statement?
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
8
If the loop condition in a for statement is omitted, it is assumed to be false.
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
9
What does these terms refer to:

- \gg Counter-controlled while loop:
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
10
What does these terms refer to:

- \gg Decision maker:
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
11
What does these terms refer to:

- \gg Divisor:
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
12
What does these terms refer to:

- \gg End-of-file (EOF)-controlled while loop:
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
13
What does these terms refer to:

- \gg Fibonacci number:
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
14
What does these terms refer to:

- \gg Fibonacci sequence:
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
15
What does these terms refer to:

- \gg Flag variable:
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
16
What does these terms refer to:

- \gg Flag-controlled while loop:
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
17
What does these terms refer to:

- \gg for loop (indexed loop):
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
18
What does these terms refer to:

- \gg for loop control variable:
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
19
What does these terms refer to:

- \gg Infinite loop:
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
20
What does these terms refer to:

- \gg Loop control variable (LCV):
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
21
What does these terms refer to:

- \gg Nesting:
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
22
What does these terms refer to:

- \gg Posttest loop:
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
23
What does these terms refer to:

- \gg Pretest loop:
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
24
What does these terms refer to:

- \gg Sentinel:
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
25
What does these terms refer to:

- \gg Sentinel-controlled while loop:
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
locked card icon
Unlock Deck
Unlock for access to all 25 flashcards in this deck.