Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

1. Exception handling is used to _____. 2. C++ signals an error or unusual situa

ID: 3581521 • Letter: 1

Question

1. Exception handling is used to _____.
2. C++ signals an error or unusual situation by _____.
3. A throw statement passes which type of value to the catch block?
4. The catch block is also known as the _____.
5. If no exception is thrown, then the _____ is ignored.
6. The catch block- catch(...) is also known as _____.
7. If a function throws an exception and does not catch it, then the function definition and declaration should have _____.
8. If a thrown list has multiple exceptions listed, they are separated by _____.
9. If a function does not have an exception specification, then the function can thaw _____ exceptions.
10. Can the following function throw any unhandled exception? void f1() _____
11. If the following function throws an unhandled exception, what happens? void f1() _____
12. If the following function throws an unhandled exception, what happens? void f1() throws() _____
13. If a function throw list specifies a base class type, then the function may also throw an exception of the _____ class type.
14. If some part of your program (or any library functions that are called) throw an exception, then if this exception is not handled in your code, your program will _____.
15. The following catch block catches all _____exceptions.
catch (string e){ }

Explanation / Answer

1.handle the anomalous or exceptional conditions in a program.(Exception changes the control flow of a program)

2.std::exception (try ,catch)

3.exceptional object or type of object as a parameter.

4.Exception handler.

5.if there is any catch block it is bypassed

7.declare the exception using throw keyword.

8.vertical bar(|)

9.all the exceptions.

10.if it doesn't have catch block it may send unhandled exception

11.the function exit back to the error handling part.

12.it moves to the try block

13.base class type

14.terminate

15.string exception