Exam 12: Handling Exceptions
Exam 1: An Overview of Object-Oriented Programming and C++55 Questions
Exam 2: Evaluating C Expressions51 Questions
Exam 3: Making Decisions50 Questions
Exam 4: Performing Loops51 Questions
Exam 5: Understanding Arrays, Strings and Pointers55 Questions
Exam 6: Using C++ Functions51 Questions
Exam 7: Using Classes56 Questions
Exam 8: Class Features and Design Issues53 Questions
Exam 9: Understanding Friends and Overloading Operators52 Questions
Exam 10: Understanding Inheritance53 Questions
Exam 11: Using Templates54 Questions
Exam 12: Handling Exceptions51 Questions
Exam 13: Advanced Input and Output55 Questions
Exam 14: Advanced Topics53 Questions
Select questions type
When any object is thrown with a throw statement, what conditions does a subsequent catch block have to meet to have a usable match?
(Essay)
4.7/5
(32)
The ____ function was created to solve the universal problem of insufficient memory.
(Multiple Choice)
4.8/5
(42)
Match each term with the correct statement below.
Premises:
one or more statements that the program attempts to execute, but which might result in thrown exceptions
Responses:
message
exception specification
try block
Correct Answer:
Premises:
Responses:
(Matching)
4.9/5
(44)
When you include multiple catch blocks in a program, ____ catch block that is able to accept a thrown object is the one that will execute.
(Multiple Choice)
4.8/5
(30)
____________________ are errors that occur during execution of object-oriented programs, and are so-named because, presumably, they are not usual occurrences.
(Short Answer)
4.9/5
(44)
Describe the general principle underlying good object-oriented error handling.
(Essay)
4.9/5
(35)
You should be careful when writing an exception specification using a(n) ____________________ because any type might eventually be instantiated.
(Essay)
4.9/5
(38)
Match each term with the correct statement below.
Premises:
passed object that contains information
Responses:
exception class
exit() function
message
Correct Answer:
Premises:
Responses:
(Matching)
4.9/5
(44)
If a function throws an exception, but the function call has not been placed in a(n) ____________________ block, then the program terminates.
(Short Answer)
4.9/5
(36)
Match each term with the correct statement below.
Premises:
contains statements that execute when an exception is thrown
Responses:
default exception handler
message
exit() function
Correct Answer:
Premises:
Responses:
(Matching)
4.7/5
(39)
When using the exit() function, it is traditional to use a non-zero argument to indicate a program exited normally, and a 0 argument to indicate an error.
(True/False)
4.9/5
(32)
Match each term with the correct statement below.
Premises:
object that contains information that is passed from the place where a problem occurs to another place that will handle the problem
Responses:
exception specification
message
try block
Correct Answer:
Premises:
Responses:
(Matching)
4.9/5
(32)
A catch block ____ display, or to use in any way, what is thrown.
(Multiple Choice)
4.9/5
(33)
You ____________________ a function; if it throw s an exception, you catch and handle it.
(Short Answer)
4.7/5
(36)
You create a default exception handler by creating a(n) ____ block with an ellipsis (…) as its parameter.
(Multiple Choice)
4.8/5
(40)
Showing 21 - 40 of 51
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)