Exam 4: Making Decisions
Exam 1: Introduction to Computers and Programming40 Questions
Exam 2: Introduction to C Plus Plus40 Questions
Exam 3: Expressions and Interactivity40 Questions
Exam 4: Making Decisions40 Questions
Exam 5: Looping40 Questions
Exam 6: Functions40 Questions
Exam 7: Introduction to Classes and Objects40 Questions
Exam 8: Arrays40 Questions
Exam 9: Searching, Sorting, Algorithm Analysis40 Questions
Exam 10: Pointers62 Questions
Exam 11: More About Classes and Object-Oriented Programming70 Questions
Exam 12: More on C-Strings and the String Class40 Questions
Exam 13: Advanced File and Io Operations40 Questions
Exam 14: Recursion20 Questions
Exam 15: Polymorphism and Virtual Functions22 Questions
Exam 16: Exceptions, Templates, and the Standard Template Library Stl40 Questions
Exam 17: Linked Lists38 Questions
Exam 18: Stacks and Queues36 Questions
Exam 19: Binary Trees38 Questions
Select questions type
The ________ operator is used in C++ to test for equality.
Free
(Multiple Choice)
4.7/5
(40)
Correct Answer:
D
The ________ operator is known as the logical OR operator.
Free
(Multiple Choice)
4.9/5
(28)
Correct Answer:
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:
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)
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 ________ 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
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)