M2 CH4 Flashcards

1
Q

Which of the following is a logical operator?
AND
NOT
OR
All of these
None of these

A

All of these

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

If the expression is false, the ________ operator will return true.
AND
NOT
OR
All of these
None of these

A

NOT

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

What type of operators are the following?
> < >= <= == !=

Boolean
Relational
Logical
Mathematical
None of these

A

Relational

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

A case structure is a ________ alternative decision structure.
Single
Dual
Multiple
Single or dual
All of these

A

Multiple

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

Consider the following statement:
A store is giving a discount of 30% for all purchases of over $100.
Which of the following is not the appropriate structure to use to program the statement?

Control
Decision
Selection
Sequence
None of these

A

Sequence

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

Which operator is used to determine that the operands are not exactly of the same value?

=
!
=!
==
None of these

A

None of these

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

The ________ operator could be used, in some situations, to simplify nested selection structures.

AND
NOT
OR
All of these
None of these

A

AND

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

Which structure is a logical design that controls the order in which a set of statements executes?

Control
Sequence
Module
Terminal
None of these

A

Control

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

The ________ symbol indicates that some condition must be tested in a flowchart.

Rectangle
Oval
Parallelogram
Square
Diamond

A

Diamond

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

What type of operator can be used to determine whether a specific relationship exists between two values?

Boolean
Relational
Logical
Mathematical
None of these

A

Relational

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

In many languages the case structure is called a ________ statement.

Branch
Jump
Selective
Switch
All of these

A

Switch

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

Which of the following operators reverses the logic of its operand?

NOT
AND
OR
All of these
None of these

A

NOT

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

Which operator would make the following expression true?
False________True

AND
NOT
OR
All of these
None of these

A

OR

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

Which operator would make the following expression false?
True_____False

AND
NOT
OR
All of these
None of these

A

AND

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

What two logical operators perform short-circuit evaluation?
NOT and OR
AND and OR
AND and NOT
All of these
None of these

A

AND and OR

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

A condition is a ________ expression.
Boolean
Relational
Logical
Mathematical
None of these