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
what is C++ objects?
What are c++ variables?
Is c++ a software?
What is the use of :: operator in c++?
How many types of classes are there in c++?
What is binary object model?
If you push the numbers (in order) 1, 3, and 5 onto a stack, which pops out first a) 1 b) 5 c) 3
How do you decide which integer type to use?
What is difference between array and vector in c++?
Differentiate between the manipulator and setf( ) function?
Explain pass by value and pass by reference.
What are the uses of c++ in the real world?
What is an iterator class in c++?
What is a tuple c++?
How come you find out if a linked-list is a cycle or not?