Q66
What will be the output of the following C++ code? #include #include #include using namespace std; class A int a; public: A() ; class B: public A int b; public: B() ; void func() B b; throw b; int main() try func(); catch(A a) cout<<"Caught A Class "; catch(B b) cout<<"Caught B Class ";
A.
Caught B Class
B.
Caught A Class
AnswerC.
Compile-time error
D.
Run-time error
Answer: Option B
Solution
Answer: Option B
No explanation is given for this question Let's Discuss on Board