Exam 14: Exception Handling

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

The class ____ is designed to deal with errors that can be detected only during program execution.

Free
(Multiple Choice)
4.9/5
(42)
Correct Answer:
Verified

C

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

Free
(True/False)
4.7/5
(30)
Correct Answer:
Verified

True

In a sequence of try/catch blocks,the last catch block of that sequence should be ____.

Free
(Multiple Choice)
4.8/5
(43)
Correct Answer:
Verified

A

Which of the following classes is derived from the class runtime_error?

(Multiple Choice)
4.9/5
(33)

The function ____ of the class exception returns a string containing an appropriate message.

(Multiple Choice)
4.7/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.8/5
(43)

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

(Multiple Choice)
4.8/5
(37)

The ____________________ of the catch block parameter specifies the type of exception that the catch block can catch.

(Short Answer)
4.8/5
(33)

When an exception is thrown in a function,the function can do the following: ____________________; partially process the exception and throw the same exception or a new exception; or throw a new exception.

(Short Answer)
4.9/5
(38)

Throwing an exception is typically done using the ____________________ statement.

(Short Answer)
4.9/5
(46)

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

(Short Answer)
4.8/5
(34)

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

(Short Answer)
4.7/5
(46)

The class ____ is designed to deal with illegal arguments used in a function call.

(Multiple Choice)
4.8/5
(36)

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

(True/False)
4.8/5
(36)

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

(Multiple Choice)
4.7/5
(41)

An object that is being thrown cannot be an anonymous object.

(True/False)
4.7/5
(42)

If no exception is thrown in a try block,all catch blocks associated with that try block are ignored.

(True/False)
4.8/5
(40)

A catch block specifies the type of exception it can catch and immediately terminates the program.

(True/False)
4.8/5
(40)

A(n)____ is an occurrence of an undesirable situation that can be detected during program execution.

(Multiple Choice)
4.9/5
(37)

The string concatenation operator is ____________________.

(Short Answer)
4.8/5
(40)
Showing 1 - 20 of 50
close modal

Filters

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