Exam 14: Exception Handling

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

The statements that may generate an exception are placed in a ____ block.

(Multiple Choice)
4.8/5
(30)

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

(Multiple Choice)
4.8/5
(41)

The function ____ can check whether an expression meets the required conditions; if the conditions are not met,it terminates the program.

(Multiple Choice)
4.9/5
(42)

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

(True/False)
4.8/5
(32)

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

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

(Multiple Choice)
4.9/5
(35)

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

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

(Multiple Choice)
4.9/5
(39)

Which of the following statements creates a new exception class?

(Multiple Choice)
4.9/5
(32)

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

(Multiple Choice)
4.8/5
(41)

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

(True/False)
4.8/5
(36)

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

(Short Answer)
4.9/5
(43)

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

(Multiple Choice)
4.8/5
(38)

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

(Short Answer)
4.9/5
(42)

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

When an exception occurs in a try block,control immediately passes to one of the ____________________ blocks.

(Short Answer)
4.8/5
(39)

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

The general syntax to rethrow an exception caught by a catch block is: ____ (in this case,the same exception is rethrown).

(Multiple Choice)
4.9/5
(34)

If a length greater than the maximum allowed for a string object is used,the class ____________________ deals with the error that occurs.

(Short Answer)
4.9/5
(33)

The class ____________________ deals with the string subscript out of range error.

(Short Answer)
4.8/5
(30)
Showing 21 - 40 of 50
close modal

Filters

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