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
Program to check whether a word is a sub-string or not of a string typed
What is stack unwinding?
How is computer programming useful in real life?
When the constructor of a base class calls a virtual function, why doesn't the override function of the derived class gets called?
Explain about Virtual Function in C++?
Explain the difference between c & c++?
What is the word you will use when defining a function in base class to allow this function to be a polimorphic function?
Can you Mention some Application of C/C++?
What is the use of volatile variable?
Define token in c++.
Write a note about the virtual member function?
What do you mean by inheritance in c++? Explain its types.
Explain what are single and multiple inheritances in c++?
Is java made in c++?
What is abstraction c++?