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 is the use of namespace std in C++?
In what situations do you have to use initialization list rather than assignment in constructors?
What are containers in c++?
Can we use this pointer inside static member function?
How important is c++?
What is the function of the keyword ‘volatile’ in C++?
Is nan a c++?
Explain selection sorting?
What are enumerations?
Explain queue. How it can be implemented?
what is COPY CONSTRUCTOR and what is it used for?
What are friend functions in C++?