Exam 4: Decision Structures and Boolean Logic

arrow
  • Select Tags
search iconSearch Question
flashcardsStudy Flashcards
  • Select Tags

Which of the following is a logical operator?

Free
(Multiple Choice)
4.9/5
(33)
Correct Answer:
Verified

D

Although the sequence structure is heavily used in programming,it cannot handle every type of task.

Free
(True/False)
4.7/5
(37)
Correct Answer:
Verified

True

The If-Then-Else statement should be used to write a single alternative decision structure.

Free
(True/False)
4.8/5
(30)
Correct Answer:
Verified

False

Boolean variables are commonly used as __________,which indicate whether a specific condition exits.

(Short Answer)
4.7/5
(32)

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

(Multiple Choice)
4.9/5
(39)

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

(Multiple Choice)
4.8/5
(43)

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

(Multiple Choice)
4.8/5
(34)

The _________________ decision structure provides only one alternative path of execution.

(Short Answer)
4.9/5
(41)

A nested decision structure can achieve the same logic as a case structure.

(True/False)
4.7/5
(43)

A case structure is a ___________ alternative decision structure.

(Multiple Choice)
4.9/5
(36)

An If statement will produce unpredictable results if the programmer does not use proper indentations in pseudocode.

(True/False)
4.9/5
(36)

The __________ operator requires both sub expressions to be true for the compound expression to be true.

(Short Answer)
4.8/5
(36)

The _____ operator is best to determine whether a number is outside a range.

(Short Answer)
4.8/5
(34)

A ____________ expression evaluates as either true or false.

(Short Answer)
4.9/5
(32)

The short-circuit evaluation is performed with expressions containing any logical operators.

(True/False)
4.8/5
(41)

The expression with an AND operator ___________ when the expression on its left is false and so it does not evaluate the expression on its right.

(Short Answer)
4.8/5
(35)

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?

(Multiple Choice)
4.8/5
(45)

When a program performs actions only under certain conditions,it is using a _________ structure.

(Short Answer)
4.9/5
(34)

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

(Multiple Choice)
4.9/5
(24)

Which operator is best to determine whether x contains a value in the range of 10 through 57?

(Multiple Choice)
4.7/5
(36)
Showing 1 - 20 of 44
close modal

Filters

  • Essay(0)
  • Multiple Choice(0)
  • Short Answer(0)
  • True False(0)
  • Matching(0)