Ch 4 CIST 1305

25 July 2022
4.7 (114 reviews)
29 test answers

Unlock all answers in this set

Unlock answers (25)
question
*A nested decision structure can be used to test more than one condition. A ) True B ) False
answer
True
question
*Which structure is a logical design that controls the order in which a set of statements executes? A ) Control B ) Sequence C ) Module D ) Terminal E ) None of these
answer
Control
question
It is possible to write a complete program using only a decision structure. A ) True B ) False
answer
False
question
The If-Then-Else statement should be used to write a single alternative decision structure. A ) True B ) False
answer
False
question
The ________ operator is a unary operator, as it works with only one operand. A ) AND B ) NOT C ) OR D ) All of these E ) None of these
answer
NOT
question
*The If-Then-Else statement can be used to simplify a complex nested decision structure. A ) True B ) False
answer
True
question
*Which operator is used to determine that the operands are not exactly of the same value? A ) = B ) ! C ) =! D ) == E ) None of these
answer
None of these
question
*Which of the following is a logical operator? A ) AND B ) NOT C ) OR D ) All of these E ) None of these
answer
All of these
question
Which operator is best to determine whether x contains a value in the range of 10 through 57? A ) AND B ) NOT C ) OR D ) == E ) None of these
answer
AND
question
Which of the following operators reverses the logic of its operand? A ) NOT B ) AND C ) OR D ) All of these E ) None of these
answer
NOT
question
*In an expression with an OR operator, it does not matter which sub expression is true for the compound expression to be true. A ) True B ) False
answer
True
question
The ________ operator could be used, in some situations, to simplify nested selection structures. A ) AND B ) NOT C ) OR D ) All of these E ) None of these
answer
AND
question
What two logical operators perform short-circuit evaluation? A ) NOT and OR B ) AND and OR C ) AND and NOT D ) All of these E ) None of these
answer
AND and OR
question
If the expression is false, the ________ operator will return true. A ) AND B ) NOT C ) OR D ) All of these E ) None of these
answer
NOT
question
Which operator would make the following expression true? False______________True A ) AND B ) NOT C ) OR D ) All of these E ) None of these
answer
OR
question
A condition is a ________ expression. A ) Boolean B ) Relational C ) Logical D ) Mathematical E ) None of these
answer
Boolean
question
An If statement will produce unpredictable results if the programmer does not use proper indentations in pseudocode. A ) True B ) False
answer
False
question
Although the sequence structure is heavily used in programming, it cannot handle every type of task. A ) True B ) False
answer
True
question
What type of operator can be used to determine whether a specific relationship exists between two values? A ) Boolean B ) Relational C ) Logical D ) Mathematical E ) None of these
answer
Relational
question
*The short-circuit evaluation is performed with expressions containing any logical operators. A ) True B ) False
answer
False
question
Decision structures are also known as selection structures. A ) True B ) False
answer
True
question
A case structure is a ________ alternative decision structure. A ) Single B ) Dual C ) Multiple D ) Single or dual E ) All of these
answer
Multiple
question
Which operator would make the following expression false? True ____________False A ) AND B ) NOT C ) OR D ) All of these E ) None of these
answer
And
question
*A nested decision structure can achieve the same logic as a case structure. A ) True B ) False
answer
True
question
*The ________ symbol indicates that some condition must be tested in a flowchart. A ) Rectangle B ) Oval C ) Parallelogram D ) Square E ) Diamond
answer
Diamond
question
Pseudocode could be logically incorrect if not properly indented. A ) True B ) False
answer
False
question
In many languages the case structure is called a ________ statement. A ) Branch B ) Jump C ) Selective D ) Switch E ) All of these
answer
Switch
question
*The first line of the case structure starts with the word CASE followed by the test expression. A ) True B ) False
answer
False
question
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? A ) Control B ) Decision C ) Selection D ) Sequence E ) None of these
answer
Sequence