Exam 14: Exception Handling

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

The try block is followed by one or more ____ blocks.

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

D

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

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

D

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

Free
(True/False)
4.9/5
(38)
Correct Answer:
Verified

False

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

(Short Answer)
4.8/5
(35)

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

(Short Answer)
4.9/5
(37)

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

(Multiple Choice)
4.8/5
(38)

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

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

(Multiple Choice)
4.8/5
(33)

One of the typical ways of dealing with exceptions is to use an if statement.

(True/False)
4.7/5
(33)

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

(True/False)
4.9/5
(27)

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

(Multiple Choice)
4.8/5
(33)

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

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

(Short Answer)
4.8/5
(34)

Which of the following statements creates a new exception class?

(Multiple Choice)
4.9/5
(46)

The string concatenation operator is represented by the ____________________ symbol.

(Short Answer)
4.9/5
(41)

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

(Short Answer)
4.8/5
(40)

When division by zero occurs and the problem is not addressed, the program crashes with an error message that is ____ dependent.

(Multiple Choice)
4.7/5
(42)

In C++, throw is a(n) ____________________ word.

(Short Answer)
4.9/5
(35)

Suppose you have written a program that inputs data from a file.If the input file does not exist when the program executes, then you should choose which option?

(Multiple Choice)
4.7/5
(37)

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

(True/False)
4.8/5
(40)
Showing 1 - 20 of 43
close modal

Filters

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