M2 CH4 Flashcards
Which of the following is a logical operator?
AND
NOT
OR
All of these
None of these
All of these
If the expression is false, the ________ operator will return true.
AND
NOT
OR
All of these
None of these
NOT
What type of operators are the following?
> < >= <= == !=
Boolean
Relational
Logical
Mathematical
None of these
Relational
A case structure is a ________ alternative decision structure.
Single
Dual
Multiple
Single or dual
All of these
Multiple
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
Sequence
Which operator is used to determine that the operands are not exactly of the same value?
=
!
=!
==
None of these
None of these
The ________ operator could be used, in some situations, to simplify nested selection structures.
AND
NOT
OR
All of these
None of these
AND
Which structure is a logical design that controls the order in which a set of statements executes?
Control
Sequence
Module
Terminal
None of these
Control
The ________ symbol indicates that some condition must be tested in a flowchart.
Rectangle
Oval
Parallelogram
Square
Diamond
Diamond
What type of operator can be used to determine whether a specific relationship exists between two values?
Boolean
Relational
Logical
Mathematical
None of these
Relational
In many languages the case structure is called a ________ statement.
Branch
Jump
Selective
Switch
All of these
Switch
Which of the following operators reverses the logic of its operand?
NOT
AND
OR
All of these
None of these
NOT
Which operator would make the following expression true?
False________True
AND
NOT
OR
All of these
None of these
OR
Which operator would make the following expression false?
True_____False
AND
NOT
OR
All of these
None of these
AND
What two logical operators perform short-circuit evaluation?
NOT and OR
AND and OR
AND and NOT
All of these
None of these
AND and OR
A condition is a ________ expression.
Boolean
Relational
Logical
Mathematical
None of these
Boolean