Exam 14: Exception Handling

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

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 order of the catch blocks does not affect the program.

(True/False)
4.9/5
(38)

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)

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

(True/False)
4.7/5
(38)

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)

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

(True/False)
4.7/5
(35)
Showing 21 - 40 of 43
close modal

Filters

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