Deck 5: Control Structures II Repetition
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Unlock Deck
Sign up to unlock the cards in this deck!
Unlock Deck
Unlock Deck
1/25
Play
Full screen (f)
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
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:
- Counter-controlled while loop:
- 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:
- Decision maker:
- 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:
- Divisor:
- 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:
- End-of-file (EOF)-controlled while loop:
- 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:
- Fibonacci number:
- 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:
- Fibonacci sequence:
- 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:
- Flag variable:
- 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:
- Flag-controlled while loop:
- 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:
- for loop (indexed loop):
- 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:
- for loop control variable:
- 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:
- Infinite loop:
- 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:
- Loop control variable (LCV):
- 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:
- Nesting:
- 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:
- Posttest loop:
- 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:
- Pretest loop:
- 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:
- Sentinel:
- 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:
- Sentinel-controlled while loop:
- Sentinel-controlled while loop:
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck