Which of the following statements are true?

A. Throwing an exception that is not declared in the throw list will causes function unexpected to be invoked.
B. A function should warn the programmers that any exceptions it might throw, so the programmers can write robust program to deal with these potential exceptions in a try-catch block.
C. If a function is declared as returnType functionName(parameterList) throw (type), this function can only throw the exception of the specified type.
D. Placing throw() after a function header, known as an empty exception specification, declares that the function does not throw any exceptions.
E. A function without exception specification can throw any exception and will not cause unexpected to be invoked.


A. Throwing an exception that is not declared in the throw list will causes function unexpected to be invoked.
B. A function should warn the programmers that any exceptions it might throw, so the programmers can write robust program to deal with these potential exceptions in a try-catch block.
C. If a function is declared as returnType functionName(parameterList) throw (type), this function can only throw the exception of the specified type.
D. Placing throw() after a function header, known as an empty exception specification, declares that the function does not throw any exceptions.
E. A function without exception specification can throw any exception and will not cause unexpected to be invoked.

Computer Science & Information Technology

You might also like to view...

Write a function definition called even that takes one argument of type int and returns a bool value. The function returns true if its one argument is an even number; otherwise it returns false.

What will be an ideal response?

Computer Science & Information Technology

What is the key difference between a group of check boxes attached to a group box and a group of radio buttons attached to a group box?

(A) Only radio buttons can be toggled. (B) Only one radio button at a time can be checked. (C) Check boxes cannot be attached to a group box. (D) The only difference is the shape of the control.

Computer Science & Information Technology

The find method to locate an element in a binary tree can be implemented

a) iteratively b) recursively c) independently d) both a) and b) are correct e) all of a), b), and c) are correct

Computer Science & Information Technology

A ____ is a million pixels, calculated by multiplying the number of horizontal pixels by the number of vertical pixels.

A. megapixel B. millipixel C. large file pixel D. large size pixel

Computer Science & Information Technology