Answer the following statements true (T) or false (F)
1. An uncaught exception in C++ is ignored.
2. If an exception is thrown in a function, say, f(), but not handled there, the exception is propagated to the function that called f().
3. A circumstance in C++ where an exception is thrown must be an error.
4. When an event occurs that cannot be managed locally, an exception may be thrown. Throwing the exception object transfers control and information gleaned locally to some calling program unit that manages the event, or the program terminates.
5. In C++, an exception object can be a user-defined type or any type that is built-into C++ language.
1. False
If an exception is thrown in C++ but not handled, the penalty is program termination.
2. True.
The exception is propagated up the call chain. The exception is handled by some function in the call chain, or the program terminates.
3. False
The exceptional circumstance is often an error, but this is not required.
4. True.
5. True
The purpose of an exception handling is to manage exceptional events. The exceptional object only has to transfer sufficient information to manage the event. If a string or int carries sufficient information, the string or int can be used for the exception object.
You might also like to view...
If you want to insert data from another file into an Access database, you must use copy and paste
Indicate whether the statement is true or false
Custom paragraph spacing styles can be created in Word
Indicate whether the statement is true or false
Which of the following is a threat to a VoIP network?
a. Call flooding. b. Information is accessed by unauthorized persons. c. Attacker becoming a trusted member of the network. d. All the above are threats.
The intended audience of a document is generally described in the ____.
A. introduction B. body C. summary D. any of these