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
The class ____ is designed to deal with illegal arguments used in a function call.
Free
(Multiple Choice)
5.0/5
(42)
Correct Answer:
D
To use the assert function in your program, you should include the statement ____.
Free
(Multiple Choice)
4.8/5
(32)
Correct Answer:
B
The function ____ returns a string containing an appropriate message.
Free
(Multiple Choice)
4.9/5
(38)
Correct Answer:
B
In a sequence of try/catch blocks, the last catch block of that sequence should be ____.
(Multiple Choice)
4.8/5
(31)
A catch block specifies the type of exception it can catch and immediately terminates the program.
(True/False)
4.8/5
(50)
Which of the following classes is derived from the class runtime_error?
(Multiple Choice)
4.8/5
(39)
The class ____________________ deals with the string subscript out of range error.
(Short Answer)
4.9/5
(31)
A(n) ____ is an occurrence of an undesirable situation that can be detected during program execution.
(Multiple Choice)
4.8/5
(42)
The class ____ is designed to deal with errors that can be detected only during program execution.
(Multiple Choice)
4.9/5
(36)
To deal with logical errors in a program, such as a string subscript out of range or an invalid argument to a function call, several classes are derived from the class ____.
(Multiple Choice)
4.8/5
(40)
An exception is an occurrence of an undesirable situation that can be detected during program compilation.
(True/False)
4.9/5
(44)
One of the typical ways of dealing with exceptions is to use an if statement.
(True/False)
4.8/5
(37)
When division by zero occurs and the problem is not addressed, the program crashes with an error message that is ____ dependent.
(Multiple Choice)
5.0/5
(35)
Suppose you have written a program that inputs data from a file. If the input file does not exist when the program executes, then you should choose which option?
(Multiple Choice)
4.8/5
(42)
The ____________________ of the catch block parameter specifies the type of exception that the catch block can catch.
(Short Answer)
4.8/5
(32)
The class ____ is the base of the classes designed to handle exceptions.
(Multiple Choice)
5.0/5
(26)
If no exception is thrown in a try block, all catch blocks associated with that try block are ignored.
(True/False)
4.8/5
(34)
The statements that may generate an exception are placed in a ____ block.
(Multiple Choice)
4.9/5
(42)
Showing 1 - 20 of 42
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)