Exam 14: Exception Handling
Exam 1: An Overview of Computers and Programming Languages50 Questions
Exam 2: Basic Elements of C++50 Questions
Exam 3: Input/Output50 Questions
Exam 4: Control Structures I (Selection)50 Questions
Exam 5: Control Structures II (Repetition)50 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 (structs)50 Questions
Exam 10: Classes and Data Abstraction50 Questions
Exam 11: Inheritance and Composition50 Questions
Exam 12: Pointers, Classes, Virtual Functions, Abstract Classes, and Lists50 Questions
Exam 13: Overloading and Templates50 Questions
Exam 14: Exception Handling50 Questions
Exam 15: Recursion50 Questions
Exam 16: Linked Lists50 Questions
Exam 17: Stacks and Queues50 Questions
Exam 18: Searching and Sorting Algorithms50 Questions
Exam 19: Binary Trees50 Questions
Exam 20: Graphs50 Questions
Exam 21: Standard Template Library (STL)50 Questions
Select questions type
The statements that may generate an exception are placed in a ____ block.
(Multiple Choice)
4.8/5
(30)
When division by zero occurs and the problem is not addressed,the program crashes with an error message that is ____ dependent.
(Multiple Choice)
4.8/5
(41)
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
(42)
One of the typical ways of dealing with exceptions is to use an if statement.
(True/False)
4.8/5
(32)
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.8/5
(38)
Which of the following blocks is designed to catch any type of exception?
(Multiple Choice)
4.9/5
(35)
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.8/5
(31)
Which of the following statements creates a new exception class?
(Multiple Choice)
4.9/5
(32)
A catch block can have,at most,____ catch block parameter(s).
(Multiple Choice)
4.8/5
(41)
If the operator new cannot allocate memory space,this operator throws a(n)____________________ exception.
(Short Answer)
4.9/5
(43)
Suppose you have written a program that inputs data from a file.If the input file does not exist when the program executes,then which option should you choose for handling the issue?
(Multiple Choice)
4.8/5
(38)
If the operator new cannot allocate memory space,this operator throws a(n)____________________ exception.
(Short Answer)
4.9/5
(42)
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.8/5
(41)
When an exception occurs in a try block,control immediately passes to one of the ____________________ blocks.
(Short Answer)
4.8/5
(39)
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.7/5
(42)
The general syntax to rethrow an exception caught by a catch block is: ____ (in this case,the same exception is rethrown).
(Multiple Choice)
4.9/5
(34)
If a length greater than the maximum allowed for a string object is used,the class ____________________ deals with the error that occurs.
(Short Answer)
4.9/5
(33)
The class ____________________ deals with the string subscript out of range error.
(Short Answer)
4.8/5
(30)
Showing 21 - 40 of 50
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)