Chapter 3 Flashcards

1
Q

When a loop executes, the structure-controlling condition is ______________.

A

tested either before or after the loop body executes

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

Attaching structures end to end is called ______________.

A

stacking

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

Which of the following attributes do all three basic structures share?

A

They all have one entry and one exit point.

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

Which of the following is not a benefit of modularizing programs?

A

If you use modules, you can ignore the rules of structure.

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

In a selection structure, the structure-controlling condition is ______________.

A

tested once at the beginning of the structure

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

Which of the following is true of structured logic?

A

Any task can be described using some combination of the three structures: sequence, selection, and loop.

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

When an action is required if a condition is true, but no action is needed if it is false, you use a ______________.

A

single-alternative selection

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

Which of the following is acceptable in a structured program?

A

a. placing a sequence within the true branch of a dual-alternative decision
b. placing a loop within one of the steps in a sequence
c. All of these are acceptable.**
d. placing a decision within a loop

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

Which of the following is not another term for a selection structure?

A

loop structure

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

Placing a structure within another structure is called the ______________ structures.

A

nesting

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

Which of the following is not a reason for enforcing structure rules in computer programs?

A

Structured programs usually are shorter than unstructured ones.

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

A sequence structure can contain ______________.

A

any number of tasks

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

A ______________ expression has one of two values, often expressed as true or false.

A

Boolean

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

Snarled program logic is called ______________ code.

A

spaghetti

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

Which is true of stacking structures?

A

Each structure has only one point where it can be stacked on top of another.

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

When you input data in a loop within a program, the input statement that precedes the loop ______________.

A

is called a priming input

17
Q

A group of statements that executes as a unit is a ______________.

18
Q

When you must perform one action when a condition is true and a different one when it is false, you use a ______________.

A

dual-alternative selection

19
Q

The three structures of structured programming are ______________.

A

sequence, selection, and loop

20
Q

To take action as long as a condition remains true, you use a ______________.