Exam 14: Exception Handling
Exam 1: An Overview of Computers and Programming Languages50 Questions
Exam 2: Basic Elements of C50 Questions
Exam 3: Inputoutput50 Questions
Exam 4: Control Structures I Selection50 Questions
Exam 5: Control Structures II Repetition50 Questions
Exam 6: User-Defined Functions50 Questions
Exam 7: User-Defined Simple Data Types, Namespaces, and the String Type50 Questions
Exam 8: Arrays and Strings50 Questions
Exam 9: Records Structs50 Questions
Exam 10: Classes and Data Abstraction49 Questions
Exam 11: Inheritance and Composition50 Questions
Exam 12: Pointers, Classes, Virtual Functions, and Abstract Classes50 Questions
Exam 13: Overloading and Templates50 Questions
Exam 14: Exception Handling50 Questions
Exam 15: Recursion50 Questions
Exam 16: Searching, Sorting and the Vector Type50 Questions
Exam 17: Linked Lists50 Questions
Exam 18: Stacks and Queues50 Questions
Select questions type
Which of the following classes is derived from the class runtime_error?
Free
(Multiple Choice)
4.9/5
(33)
Correct Answer:
C
The class ____ is designed to deal with illegal arguments used in a function call.
Free
(Multiple Choice)
4.9/5
(37)
Correct Answer:
D
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.
Free
(True/False)
4.9/5
(34)
Correct Answer:
False
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
(40)
Which of the following statements creates a new exception class?
(Multiple Choice)
4.8/5
(34)
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.9/5
(31)
The statements that may generate an exception are placed in a ____ block.
(Multiple Choice)
4.8/5
(33)
One of the typical ways of dealing with exceptions is to use an if statement.
(True/False)
4.8/5
(48)
The code to handle exceptions depends on the type of application you develop.
(True/False)
4.8/5
(34)
The function ____ can check whether an expression meets the required conditions; if the conditions are not met, it terminates the program.
(Multiple Choice)
4.9/5
(41)
When an exception occurs in a program, the programmer usually has three choices: ____________________, include code in the program to recover from the exception, or log the error and continue.
(Short Answer)
4.8/5
(39)
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
(32)
When an exception is thrown in a function, the function can do the following: ____________________; partially process the exception and throw the same exception or a new exception; or throw a new exception.
(Short Answer)
4.8/5
(33)
A catch block can have, at most, ____ catch block parameter(s).
(Multiple Choice)
4.9/5
(39)
Throwing an exception is typically done using the ____________________ statement.
(Short Answer)
4.7/5
(34)
If you want to include members in your exception class, you typically include the function ____.
(Multiple Choice)
4.9/5
(38)
In a sequence of try/catch blocks, the last catch block of that sequence should be ____.
(Multiple Choice)
4.8/5
(36)
Showing 1 - 20 of 50
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)