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 Classes44 Questions
Exam 13: Operator Overloading and Templates41 Questions
Exam 14: Exception Handling43 Questions
Exam 15: Recursion43 Questions
Exam 16: Linked Lists40 Questions
Exam 17: Stacks and Queue43 Questions
Exam 18: Searching and Sorting Algorithms40 Questions
Exam 19: Binary Trees43 Questions
Exam 20: Graph Algorithms48 Questions
Exam 21: Standard Template Library41 Questions
Select questions type
In a sequence of try/catch blocks, the last catch block of that sequence should be ____.
(Multiple Choice)
4.7/5
(36)
The function ____ returns a string containing an appropriate message.
(Multiple Choice)
4.8/5
(35)
The class ____________________ deals with the string subscript out of range error.
(Short Answer)
4.8/5
(32)
The statements that may generate an exception are placed in a ____ block.
(Multiple Choice)
4.8/5
(37)
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
(40)
Throwing an exception is typically done using the ____________________ statement.
(Short Answer)
4.7/5
(39)
The logic_error and runtime_error classes are defined in the header file ____.
(Multiple Choice)
4.9/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.8/5
(40)
A catch block can have, at most, ____ catch block parameter(s).
(Multiple Choice)
5.0/5
(40)
The class ____ is the base of the classes designed to handle exceptions.
(Multiple Choice)
4.8/5
(37)
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.9/5
(41)
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
(35)
If no exception is thrown in a try block, all catch blocks associated with that try block are ignored.
(True/False)
4.9/5
(26)
Which of the following classes is derived from the class runtime_error?
(Multiple Choice)
4.8/5
(39)
To use the assert function in your program, you should include the statement ____.
(Multiple Choice)
4.8/5
(36)
Which of the following options should you choose when an exception occurs in a program that analyzes an airline's ticketing transactions?
(Multiple Choice)
4.9/5
(40)
Which of the following blocks is designed to catch any type of exception?
(Multiple Choice)
4.9/5
(34)
Showing 21 - 40 of 43
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)