Exam 16: Exception Handling

arrow
  • Select Tags
search iconSearch Question
  • Select Tags

If a function throw list specifies a base class type,then the function may also throw an exception of the ________ class type.

Free
(Short Answer)
4.9/5
(36)
Correct Answer:
Verified

derived

In a try block,the throw statement is always executed.

Free
(True/False)
4.8/5
(34)
Correct Answer:
Verified

False

If class A is derived from class B,and a virtual function in class B throws an exception,then the overridden version of that function in class A must

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

B

Can the following function throw any unhandled exceptions? void f1 );

(Short Answer)
4.8/5
(42)

If a function throws an exception,

(Multiple Choice)
4.8/5
(36)

The block of code that checks if an unusual situation or error occurs is called

(Multiple Choice)
4.8/5
(36)

If the following function throws an unhandled exception,what happens? void f1);

(Essay)
4.9/5
(38)

Functions may potentially throw at most one exception.

(True/False)
4.9/5
(44)

The catch block is a function.

(True/False)
4.9/5
(35)

The following catch statement Catch...)

(Multiple Choice)
4.8/5
(33)

Given the following function definition,what happens if the function throws the exception? Void f1 )throw double) { If //some code here) Throw 12; }

(Multiple Choice)
4.9/5
(44)

A catch block that expects an integer argument will catch

(Multiple Choice)
4.9/5
(38)

If a function does not have an exception specification,then the function can thaw _______ exceptions.

(Short Answer)
4.8/5
(42)

Exception handling is used to _____________.

(Essay)
4.8/5
(38)

If you have a function that might throw an exception and some programs that use that function might want to handle that exception differently,you should

(Multiple Choice)
4.8/5
(27)

Which of the following code fragments are illegal?

(Multiple Choice)
4.7/5
(41)

If a function throws an exception,it must be caught inside that function.

(True/False)
4.8/5
(40)

The throw statement is enclosed in

(Multiple Choice)
4.8/5
(38)

A throw statement passes which type of value to the catch block?

(Short Answer)
4.9/5
(45)

The block of code that handles an exception is called

(Multiple Choice)
4.9/5
(47)
Showing 1 - 20 of 47
close modal

Filters

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