Exam 14: Exception Handling
Exam 1: An Overview of Computers and Programming Languages40 Questions
Exam 2: Basic Elements of C++50 Questions
Exam 3: Inputoutput40 Questions
Exam 4: Control Structures I Selection40 Questions
Exam 5: Control Structures II Repetition40 Questions
Exam 6: User-Defined Function41 Questions
Exam 7: Namespaces, the Class String, and User-Defined Simple Data Types40 Questions
Exam 8: Arrays40 Questions
Exam 9: Records Structs40 Questions
Exam 10: Classes and Data Abstraction43 Questions
Exam 11: Inheritance and Composition41 Questions
Exam 12: Pointers, Classes, Virtual Functions, and Abstract Classes43 Questions
Exam 13: Overloading and Templates41 Questions
Exam 14: Exception Handling42 Questions
Exam 15: Recursion41 Questions
Exam 16: Searching and Sorting46 Questions
Exam 17: Linked Lists41 Questions
Exam 18: Stacks and Queues42 Questions
Select questions type
If the operator new cannot allocate memory space, this operator throws a(n) ____________________ exception.
(Short Answer)
4.9/5
(40)
If you want to include members in your exception class, you typically include the function ____.
(Multiple Choice)
4.8/5
(31)
Which of the following options should you choose when an exception occurs in the program that analyzes an airline's ticketing transactions?
(Multiple Choice)
4.7/5
(36)
When an exception is thrown in a function, the function-call stack is ____ so that the exception can be caught in the next try/catch block.
(Multiple Choice)
4.8/5
(45)
A catch block can have, at most, ____ catch block parameter(s).
(Multiple Choice)
4.8/5
(31)
The logic_error and runtime_error classes are defined in the header file ____.
(Multiple Choice)
4.9/5
(37)
Which of the following statements throws a valid exception in C++?
(Multiple Choice)
4.7/5
(39)
The function ____ can check whether an expression meets the required conditions; if the conditions are not met, it terminates the program.
(Multiple Choice)
4.8/5
(33)
The general syntax to rethrow an exception caught by a catch block is: ____ (in this case, the same exception is rethrown).
(Multiple Choice)
4.8/5
(44)
All derived classes of the class exception override the function ____________________ to issue their own error messages.
(Short Answer)
4.7/5
(32)
A(n) ____________________ block specifies the type of exception it can catch and contains an exception handler.
(Short Answer)
4.9/5
(36)
If the catch block with an ellipses (in the heading) is needed, then it should be the first catch block in a sequence of try/catch blocks.
(True/False)
4.9/5
(42)
The heading of a try block can contain ellipses in place of a parameter.
(True/False)
4.9/5
(37)
When an exception is thrown, if the program does not handle the exception, then the function ____ is called to terminate the program.
(Multiple Choice)
4.9/5
(37)
Which of the following statements creates a new exception class?
(Multiple Choice)
4.9/5
(30)
Which of the following blocks is designed to catch any type of exception?
(Multiple Choice)
4.8/5
(33)
Showing 21 - 40 of 42
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)