Exam 14: Exception Handling

arrow
  • Select Tags
search iconSearch Question
flashcardsStudy Flashcards
  • Select Tags

The order of the catch blocks does not affect the program.

(True/False)
4.7/5
(33)

If the operator new cannot allocate memory space, this operator throws a(n) ____________________ exception.

(Short Answer)
4.9/5
(40)

If you want to include members in your exception class, you typically include the function ____.

(Multiple Choice)
4.8/5
(31)

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.7/5
(36)

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.8/5
(45)

A catch block can have, at most, ____ catch block parameter(s).

(Multiple Choice)
4.8/5
(31)

The logic_error and runtime_error classes are defined in the header file ____.

(Multiple Choice)
4.9/5
(37)

Which of the following statements throws a valid exception in C++?

(Multiple Choice)
4.7/5
(39)

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
(33)

C++ provides all the exception classes you will ever need.

(True/False)
4.8/5
(44)

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
(44)

Which of the following is a valid C++ statement?

(Multiple Choice)
4.9/5
(34)

In C++, any class can be considered an exception class.

(True/False)
4.9/5
(26)

All derived classes of the class exception override the function ____________________ to issue their own error messages.

(Short Answer)
4.7/5
(32)

A(n) ____________________ block specifies the type of exception it can catch and contains an exception handler.

(Short Answer)
4.9/5
(36)

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.9/5
(42)

The heading of a try block can contain ellipses in place of a parameter.

(True/False)
4.9/5
(37)

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.9/5
(37)

Which of the following statements creates a new exception class?

(Multiple Choice)
4.9/5
(30)

Which of the following blocks is designed to catch any type of exception?

(Multiple Choice)
4.8/5
(33)
Showing 21 - 40 of 42
close modal

Filters

  • Essay(0)
  • Multiple Choice(0)
  • Short Answer(0)
  • True False(0)
  • Matching(0)