What happens if an exception is throws from an, object's
constructor and object's destructor?
Answer Posted / akshay
constructor:
the destructors of all the member objects that were
correctly created are called, then code goes to the catch
statement if any
dtors:
legally allowed, however, it should be caught within the
function. if it is not caught, then it may lead to a call to
terminate() function. this call would happen in the case
when the destructor was itself called due to stack unwinding
happening because of another exception in probably some
other function.
| Is This Answer Correct ? | 2 Yes | 2 No |
Post New Answer View All Answers
Name four predefined macros.
Differentiate between the manipulator and setf( ) function?
What is a breakpoint?
Write a program which employs Recursion
What is object in c++ example?
Which should be more useful: the protected and public virtuals?
What is Destructor in C++?
Why is "using namespace std;" considered bad practice?
What is an undefined reference/unresolved external symbol error and how do I fix it?
Why do we use using namespace std in c++?
What are the various oops concepts in c++?
What do you mean by static variables?
Is c++ map a hash table?
write a corrected statement in c++ so that the statement will work properly. x = y = z + 3a;
Explain function overloading and operator overloading.