COP2253 Zybooks Chapter Four Flashcards

1
Q

loop

A

a program construct that repeatedly executes the loop’s statements (loop body) while the loop’s expression is true, when false, execution proceeds past the loop

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

iteration

A

each time through a loop’s statements

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

infinite loop

A

loop that never stops iterating

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

loop expression should describe

A

when the loop should iterate, not when it should terminate

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

sentinel value

A

a special value indicating the end of a list

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

do-while loop

A

loop constructs that first executes the loop body’s statements, then checks the loop condition

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

for loop

A

loop with three parts at the top: a loop variable initialization, a loop expression, and a loop variable update. iterates a specific number of times.

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

increment operator

A

++

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

decrement operator

A

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

break statement

A

in a loop, causes an immediate exit of the loop

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

continue statement

A

causes an immediate jump to the loop condition check

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

scope

A

the region of code where a declared name is valid

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

enumeration type (enum)

A

declares a name for a new type and possible values for that type

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