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
If the sub-expression on the left side of an && operator is True, the expression on the right side will not be checked.
(True/False)
4.8/5
(32)
The ________ operator takes an operand and reverses its truth or falsehood.
(Multiple Choice)
4.8/5
(34)
What will the following expression evaluate to?
!( 6 > 7 || 3 == 4)
(Multiple Choice)
4.8/5
(38)
A switch statement branches to a particular block of code depending on the value of a numeric (i.e. integer or floating-point) variable or constant.
(True/False)
4.7/5
(33)
The ________ statement executes one statement, or block of statements, if a condition is True and skips it, doing nothing, if the condition is false.
(Multiple Choice)
4.9/5
(36)
The following statements will not print anything.
x = 5;
if (x < 5)
cout << "Hello ";
cout << "world \n";
(True/False)
4.8/5
(38)
An expression in a C++ if statement that evaluates to 5, -5, or for that matter anything other than 0, is considered True.
(True/False)
4.9/5
(33)
Assuming moreData is a Boolean variable, the following two tests are logically equivalent.
if (moreData == True)
if (moreData)
(True/False)
4.7/5
(38)
To check if a variable has a particular value, use the = relational operator, as in the statement
if (s = 3)
cout << "S has the value 3";
(True/False)
4.9/5
(32)
The default section of a switch statement performs a similar task as the ________ portion of an if/else if statement.
(Multiple Choice)
4.7/5
(37)
The ________ statement acts like a chain of if statements. Each performs its test, one after the other, until one of them is found to be True or until the construct is exited without any test ever evaluating to True.
(Multiple Choice)
4.8/5
(24)
What will the following statement do if x equals 17 and answer = 20?
Answer = x > 100 ?
0 : 1;
(Multiple Choice)
4.9/5
(39)
Assuming goodData is a Boolean variable, the following two tests are logically equivalent.
if (goodData == false)
if (!goodData)
(True/False)
4.9/5
(38)
When a program lets the user know that an invalid menu choice has been made, this is an example of
(Multiple Choice)
5.0/5
(40)
In C++ when a relational expression is false, it has the value
(Multiple Choice)
4.8/5
(40)
A trailing else placed at the end of an if/else if statement provides a default action when ________ of the if conditions is/are True.
(Multiple Choice)
4.8/5
(36)
Showing 21 - 40 of 40
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)