Quiz3-DecisionStructures&BooleanLogic Flashcards
In many languages == operator determines whether one variable has the same value as another variable. (T/F)
True
The OR operator will evaluate to True only if both subexpressions are also True (T/F)
False
In an expression with an OR operator, it does not matter which subexpression is true for the compound expression to be true. (T/F)
True
A nested decision structure can be used to test more than one condition. (T/F)
True
A nested decision structure can achieve the same logic as a case structure. (T/F)
True
The first line of a case structure starts with the word CASE, followed by the test expression. (T/F)
False
A decision structure will produce unpredictable results if the programmer does not use proper indentation in the pseudocode.(T/F)
False
An If-Then-Else statement must be used to write a single alternative decision structure.(T/F)
False
The short-circuit evaluation is always performed with all expressions that contain any logical operators.(T/F)
False
Decision structures and selection structures are completely different.(T/F)
False
The following statement will evaluate to True: (T/F)
(5 > 6) OR (12 < 14)
True
The following statement will evaluate to True: (T/F)
(5 > 6) AND (12 < 14)
False
In a flowchart, the _________ symbol indicates that some condition must be tested.
diamond
What type of operator determines whether a specific relationship exists between two values?
A) relational
B) Boolean
C) Mathmatical
A) relational
Which operator is used in most languages to test if two operands DO NOT have the exact same value?
!=