M5S1 Flashcards

1
Q

X refers to the order in which a

program’s statements are executed

A

Flow of control

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

Any algorithm can be built using combinations of

four standardized flow of control structures:

A

sequential

selection

repetition

invocation

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

Normal flow of control for all programs is X

A

sequential

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

X is used to select which statements are

performed next based on a condition

A

Selection

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

X is used to repeat a set of statements

A

Repetition

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

X is used to invoke a sequence of
instructions using a single statement, as in
calling a function

A

Invocation

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

An expression created using a relational operator.

A

relational expression

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

Relational expressions are also known as X

A

conditions

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

The expression in a relational expression is interpreted as either X

A
true (non-zero)
or false (0).
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

grade >= 70

point out the operand and the relational operator

A

operand:
grade and 70

relational operator:
>=

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

More complex conditions can be created using the X

A

logical operations AND (&&), OR (||), and NOT (!)

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

grade >= 70 && grade < 80

point out the operand, logical operator, and the relational operator

A

operands:
grade, 70, geade, 80

relational operator:
>=, <

logical operator:
&&

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

allows you to control if a program
enters a section of code or not based on whether a given
condition is true or false

A

if statement

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

The structure of an if statement:

A

single statement

compound statement

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

X means an if or ifelse statement inside

another if statement

A

Nested if statements

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q
The if statements are
executed from the top down.
As soon as one of the
conditions controlling the if
is true, the statement
associated with that if is
executed, and the rest of the
ladder is X. If none
of the conditions is true,
then the final else statement
will be X.
A

bypassed

executed