Exam 4: Making Decisions

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

The ________ operator is used in C++ to test for equality.

Free
(Multiple Choice)
4.7/5
(40)
Correct Answer:
Verified

D

The ________ operator is known as the logical OR operator.

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

D

If the sub-expression on the left side of an || operator is True, the expression on the right side will not be checked.

Free
(True/False)
4.9/5
(42)
Correct Answer:
Verified

True

If a switch statement has no ________ statements, the program "falls through" all of the statements below the one with the matching case expression.

(Multiple Choice)
4.9/5
(36)

The scope of a variable is the program it is defined in.

(True/False)
4.8/5
(29)

Relational expressions and logical expressions are both Boolean, which means they evaluate to True or false.

(True/False)
5.0/5
(40)

Relational operators connect two or more relational expressions into one, or reverse the logic of an expression.

(True/False)
4.8/5
(29)

The following C++ test checks if the variable child is in the range 3 to 12. if (child >= 3 || child <= 12)

(True/False)
4.8/5
(35)

The rule for matching an else with an if is that an else goes with the last if statement before it that doesn't have its own else.

(True/False)
4.9/5
(31)

A flag is a variable, usually of data type ________, that signals whether or not some condition exists.

(Multiple Choice)
4.9/5
(39)

A pair of characters or a pair of string objects can be compared with any of the relational operators.

(True/False)
4.8/5
(36)

The C++ ________ operator represents logical AND.

(Multiple Choice)
4.9/5
(35)

The ________ statement executes one block of statements if a test condition is True, and another block if the condition is false.

(Multiple Choice)
4.8/5
(31)

logical operators AND and OR have a higher precedence than the NOT operator.

(True/False)
4.8/5
(32)

The ________ statement causes other program statements to execute only under certain conditions.

(Multiple Choice)
4.8/5
(42)

A(n) ________ is a variable, usually a bool, that signals when a condition exists.

(Multiple Choice)
4.8/5
(32)

When an if statement is placed within the conditionally-executed code of another if statement, this is known as a(n)

(Multiple Choice)
4.9/5
(37)

The statement pass = (score >= 7) ? True : false; does exactly the same thing as the if/else statement below: if (score >= 7) pass = True; else pass = false;

(True/False)
4.8/5
(33)

The following C++ test checks if the variable child is in the range 3 - 12. if (child >= 3 && <= 12)

(True/False)
4.8/5
(33)

Which of the following correctly declares an enumerated data type named student?

(Multiple Choice)
4.9/5
(45)
Showing 1 - 20 of 40
close modal

Filters

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