Chapter 5 Flashcards

1
Q

Break Statement

A

Break out of the current loop

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

continue statement

A

Break out of the current iteration

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

do-while loop

A

A loop construct that begins with the keyword do.

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

for loop

A

A loop construct that begins with the keyword for.

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

infinite loop

A

A loop that runs indefinitely due to a bug in the loop.

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

input redirection

A

Obtain the input from a file instead of from the console.

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

iteration

A

One time execution of the loop body.

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

loop

A

A structure that controls repeated executions of a block of statements

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

loop body

A

The part of the loop that contains the statements to be repeated.

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

nested loop

A

Consists of an outer loop and one or more inner loops. Each time the outer loop is repeated, the inner loops are reentered, and all required iterations are performed.

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

off-by-one error

A

Programmers often mistakenly reference the first element in an array with index 1, but it should be 0. This is called the off-by-one error.

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

output redirection

A

Write the output to a file instead of to the console.

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

posttest loop

A

The loop continuation condition is checked after the loop body is executed.

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

pretest loop

A

The loop continuation condition is checked before the loop body is executed.

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

sentinel value

A

Terminates and input

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

while loop

A

A loop construct that begins with the keyword while.