Exam 4: Making Decisions
Exam 1: Introduction to Computers and Programming44 Questions
Exam 2: Introduction to C++56 Questions
Exam 3: Expressions and Interactivity44 Questions
Exam 4: Making Decisions53 Questions
Exam 5: Loops and Files62 Questions
Exam 6: Functions49 Questions
Exam 7: Arrays53 Questions
Exam 8: Searching and Sorting Arrays20 Questions
Exam 10: Characters, C++-Strings, and More About the String Class42 Questions
Exam 11: Structured Data43 Questions
Exam 11: Structured Data50 Questions
Exam 12: Advanced File Operations38 Questions
Exam 13: Introduction to Classes46 Questions
Exam 14: More About Classes40 Questions
Exam 15: Inheritance, Polymorphism, and Virtual Functions38 Questions
Exam 16: Exceptions, Templates, and the Standard Template Library STL39 Questions
Exam 17: Linked Lists40 Questions
Exam 18: Stacks and Queues46 Questions
Exam 19: Recursion21 Questions
Exam 20: Binary Trees38 Questions
Select questions type
What is the value of the following expression? true && false
(Multiple Choice)
4.7/5
(66)
If the sub-expression on the left side of the || operator is true, the expression on the right side will not be checked.
(True/False)
4.9/5
(83)
What is the output of the following code?
int w = 98;
int x = 99;
int y = 0;
int z = 1;
if (x >= 99)
{
if (x < 99)
cout << y << endl;
else
cout << z << endl;
}
else
{
If (x == 99)
cout << x << endl;
else
cout << w << endl;
}
(Multiple Choice)
4.8/5
(78)
Whereas < is called a relational operator, x < y is called a(n)________________
(Multiple Choice)
4.9/5
(67)
When a relational expression is false, it has the value _____.
(Multiple Choice)
4.8/5
(75)
What is the value of the following expression? true || true
(Multiple Choice)
4.9/5
(77)
What is the value of donuts after the following code executes?
int donuts = 10;
if (donuts != 10)
donuts = 0;
else
donuts += 2;
(Multiple Choice)
4.7/5
(70)
What is the value of the following expression? false || true
(Multiple Choice)
4.9/5
(83)
What will be the value of result after the following code has been executed?
int a = 60;
int b = 15;
int result = 10;
if (a = b)
result *= 2;
(Multiple Choice)
4.9/5
(91)
The default section of a switch statement performs a similar task as the _______ portion of an if/else if statement.
(Multiple Choice)
4.8/5
(77)
This is a variable, usually a boolean or an integer, that signals when a condition exists.
(Multiple Choice)
4.8/5
(87)
Showing 41 - 53 of 53
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)