Question: 2 . Consider the following C + + skeletal program: class Big { int i; float f; void fun 1 ( ) throw int {

2. Consider the following C++ skeletal program:
class Big {
int i;
float f; void fun1() throw int {
... try {... throw i; ...
throw f; ...} catch(float){...}...
}
}
class Small {
int j;
float g; void fun2() throw float {
... try {... try {
Big.fun1(); ...
throw j; ... throw g; ...} catch(int){...}...}
catch(float){...}}
}
In each of the four throw statements, where is the exception handled? Note that fun1 is called from fun2 in class Small.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!