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 |
What are maps in c++?
What's the most powerful programming language?
Why is main an int?
What is a conversion constructor?
Can you use the function fprintf() to display the output on the screen?
What is difference between shallow copy and deep copy? Which is default?
Adobe Interview & Adobe Placement Paper
What is prototype for that c string function?
Which of the Standard C++ casts can be used to perform a ?safe? downcast: a) reinterpret_cast b) dynamic_cast c) static_cast d) const_cast
What is the best c++ compiler?
What is c++ & why it is used?
What are the different types of polymorphism in c++?