Ch 4 CIST 1305

Réussis tes devoirs et examens dès maintenant avec Quizwiz!

The If-Then-Else statement should be used to write a single alternative decision structure. A ) True B ) False

False

A case structure is a ________ alternative decision structure. A ) Single B ) Dual C ) Multiple D ) Single or dual E ) All of these

Multiple

If the expression is false, the ________ operator will return true. A ) AND B ) NOT C ) OR D ) All of these E ) None of these

NOT

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

NOT

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

NOT

*Which operator is used to determine that the operands are not exactly of the same value? A ) = B ) ! C ) =! D ) == E ) None of these

None of these

Which operator would make the following expression true? False______________True A ) AND B ) NOT C ) OR D ) All of these E ) None of these

OR

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

Relational

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

Sequence

*A nested decision structure can achieve the same logic as a case structure. A ) True B ) False

True

*A nested decision structure can be used to test more than one condition. A ) True B ) False

True

*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

True

*The If-Then-Else statement can be used to simplify a complex nested decision structure. A ) True B ) False

True

Although the sequence structure is heavily used in programming, it cannot handle every type of task. A ) True B ) False

True

Decision structures are also known as selection structures. A ) True B ) False

True

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

AND

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

AND

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

AND and OR

*Which of the following is a logical operator? A ) AND B ) NOT C ) OR D ) All of these E ) None of these

All of these

Which operator would make the following expression false? True ____________False A ) AND B ) NOT C ) OR D ) All of these E ) None of these

And

A condition is a ________ expression. A ) Boolean B ) Relational C ) Logical D ) Mathematical E ) None of these

Boolean

*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

Control

*The ________ symbol indicates that some condition must be tested in a flowchart. A ) Rectangle B ) Oval C ) Parallelogram D ) Square E ) Diamond

Diamond

*The first line of the case structure starts with the word CASE followed by the test expression. A ) True B ) False

False

*The short-circuit evaluation is performed with expressions containing any logical operators. A ) True B ) False

False

An If statement will produce unpredictable results if the programmer does not use proper indentations in pseudocode. A ) True B ) False

False

It is possible to write a complete program using only a decision structure. A ) True B ) False

False

Pseudocode could be logically incorrect if not properly indented. A ) True B ) False

False

In many languages the case structure is called a ________ statement. A ) Branch B ) Jump C ) Selective D ) Switch E ) All of these

Switch


Ensembles d'études connexes

Anatomy 2: Chapter 21- Blood Vessels and Circulation ep9-6

View Set

EMT 36 Patients with Special Challenges

View Set

Accounting 200 Final Exam - Clicker Questions

View Set

Give Me Liberty Ch. 13 A House Divided - Review Questions

View Set

Ch. 20: Nursing Management of the Pregnancy at Risk: Selected Health Conditions and Vulnerable Populations

View Set

Földrajz 9. (11.Tétel: Tényleges és relatív vízgőztartalom fogalma, a felhő és csapadékképződés okai, folyamatai, hideg- és melegfront kialakulásának okai és a frontokat kísérő időjárási jellemzők, hogyan keletkezik a csapadék meleg és hidegfront esetén?)

View Set