What happens if an exception is throws from an object's
constructor and from object's destructor?
Answers were Sorted based on User's Feedback
Answer / rajesh
exception from object's destructor - could terminate the
program while stack unwinding.
| Is This Answer Correct ? | 2 Yes | 0 No |
Answer / achal ubbott
If an exception is generated by constructor of the class
that object is not created. That means if you do
delete obj_ptr;
the destructor would not be called.
| Is This Answer Correct ? | 1 Yes | 0 No |
Answer / reegan
if an exception is throws from object constructor, it is
caught by catch block .the same thing is happen in the objects
destructor.
| Is This Answer Correct ? | 1 Yes | 3 No |
Can we change the basic meaning of an operator in c++?
What are iterators in c++?
Which function cannot be overloaded c++?
How to access a variable of the structure?
what do you mean by memory management operators
Write is a binary search tree? Write an algo and tell complexity?
What is the best free c++ compiler for windows?
Explain all the C++ concepts using examples.
What are the conditions that have to be met for a condition to be an invariant of the class?
sizeof- is it functioning statically or dynamically?
What is object in c++ example?
Describe the process of creation and destruction of a derived class object?