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 statements throws a valid exception in C++?
(Multiple Choice)
4.9/5
(38)
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.7/5
(42)
Which of the following blocks is designed to catch any type of exception?
(Multiple Choice)
4.7/5
(46)
The function ____ returns a string containing an appropriate message.
(Multiple Choice)
4.8/5
(34)
If no exception is thrown in a try block, all catch blocks associated with that try block are ignored.
(True/False)
4.7/5
(35)
If the operator new cannot allocate memory space, this operator throws a(n) ____________________ exception.
(Short Answer)
4.8/5
(35)
The logic_error and runtime_error classes are defined in the header file ____.
(Multiple Choice)
4.8/5
(35)
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.9/5
(33)
If the operator new cannot allocate memory space, this operator throws a(n) ____________________ exception.
(Short Answer)
4.9/5
(26)
The heading of a try block can contain ellipses in place of a parameter.
(True/False)
4.7/5
(39)
The ____________________ of the catch block parameter specifies the type of exception that the catch block can catch.
(Short Answer)
4.8/5
(33)
A(n) ____ is an occurrence of an undesirable situation that can be detected during program execution.
(Multiple Choice)
4.8/5
(46)
All derived classes of the class exception override the function ____________________ to issue their own error messages.
(Short Answer)
4.7/5
(38)
A(n) ____________________ block specifies the type of exception it can catch and contains an exception handler.
(Short Answer)
4.7/5
(37)
When an exception occurs in a try block, control immediately passes to one of the ____________________ blocks.
(Short Answer)
4.8/5
(38)
A catch block specifies the type of exception it can catch and immediately terminates the program.
(True/False)
4.7/5
(32)
The class ____________________ deals with the string subscript out of range error.
(Short Answer)
4.9/5
(36)
Showing 21 - 40 of 50
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)