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

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

(Short Answer)
4.9/5
(88)

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

(Multiple Choice)
4.8/5
(76)

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

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

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

(Multiple Choice)
4.8/5
(61)

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

(Multiple Choice)
4.9/5
(89)

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

(Multiple Choice)
4.7/5
(76)

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

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

(True/False)
4.8/5
(76)

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

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

(Multiple Choice)
4.9/5
(83)

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

(True/False)
4.9/5
(66)

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

(Short Answer)
4.8/5
(72)

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

(Short Answer)
4.9/5
(82)

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

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

(True/False)
4.9/5
(78)

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

Which of the following statements creates a new exception class?

(Multiple Choice)
4.8/5
(70)

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

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

Filters

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