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
Define stacks. Provide an example where they are useful.
Can a Structure contain a Pointer to itself?
Write a program to concatenate two strings.
Describe the advantage of an external iterator.
What is this weird colon-member (" : ") syntax in the constructor?
What are single and multiple inheritances in c++?
Draw a flow chart and write a program for the difference between the sum of elements with odd and even numbers. Two dimensional array.
What does it mean to declare a member function as virtual?
What is the operator in c++?
What is pure virtual function?
Define 'std'.
What is general form of pure virtual function? Explain?
Which software is best for coding?
What is an inline function in c++?
Describe friend function & its advantages.