Exam 16: Exceptions and Templates
Exam 1: Introduction to Computers and Programming47 Questions
Exam 2: Introduction to C62 Questions
Exam 3: Expressions and Interactivity45 Questions
Exam 4: Making Decisions51 Questions
Exam 5: Loops and Files60 Questions
Exam 6: Functions49 Questions
Exam 7: Arrays and Vectors56 Questions
Exam 8: Searching and Sorting Arrays30 Questions
Exam 9: Pointers47 Questions
Exam 10: Characters, C-Strings, and More About the String Class47 Questions
Exam 11: Structured Data46 Questions
Exam 12: Advanced File Operations38 Questions
Exam 13: Introduction to Classes54 Questions
Exam 14: More About Classes46 Questions
Exam 15: Inheritance, Polymorphism, and Virtual Functions43 Questions
Exam 16: Exceptions and Templates36 Questions
Exam 17: The Standard Template Library38 Questions
Exam 18: Linked Lists41 Questions
Exam 19: Stacks and Queues47 Questions
Exam 20: Recursion27 Questions
Exam 21: Binary Trees39 Questions
Select questions type
A program may not contain both a "regular" version of a function and a template version of the function.
(True/False)
4.7/5
(33)
A(n) __________ is used in a function template to specify a generic data type.
(Multiple Choice)
4.9/5
(30)
If an exception is thrown by a member function of a class object, the class __________ is called.
(Multiple Choice)
4.9/5
(36)
A(n) __________ is a value or an object that signals an error.
(Multiple Choice)
4.8/5
(21)
If you want to catch a bad_alloc exception in a program, you should include
(Multiple Choice)
5.0/5
(34)
Using a function template requires less code than overloading a function.
(True/False)
4.8/5
(36)
Class templates allow you to create one general version of a class without having to
(Multiple Choice)
4.8/5
(35)
A function template prefix is placed before the function header while a class template prefix is placed
(Multiple Choice)
4.9/5
(28)
What does the T represent in the following statement?
Template < class T >
(Multiple Choice)
5.0/5
(41)
The try/catch/throw construct is able to handle only one type of exception in a try block.
(True/False)
4.7/5
(33)
In the following code, which statement is the throw point?
double divide(int numer, int denom)
{
If (denom == 0)
throw "ERROR: Cannot divide by zero.\n";
else
return static_cast<double>(numer)/denom;
}
(Multiple Choice)
4.8/5
(29)
In a function template, the programmer substitutes __________ for __________.
(Multiple Choice)
4.8/5
(42)
To handle an exception that has been thrown, a program must have a(n)
(Multiple Choice)
4.9/5
(38)
Showing 21 - 36 of 36
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)