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 |
Write about the scope resolution operator?
What is pointer in c++ with example?
Is c++ the most powerful language?
How to declare a function pointer?
Define private, protected and public access control.
Explain dangling pointer.
What is c++ best used for?
How do you invoke a base member function from a derived class in which you have not overridden that function?
Explain how would you handle a situation where you cannot call the destructor of a local explicitly?
What is ios :: in in c++?
Is python better than c++?
Explain the problem with overriding functions