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 low level language in simple words?
What problems might the following macro bring to the application?
Compare compile time polymorphism and Runtime polymorphism
What is pointer to member?
What are the data types in c++?
Is there any difference between int [] a and int a [] in c++?
What is the basic difference between C and C++?
Difference between delete and delete[]?
5 Answers Infosys, TCS, Virtusa,
What is the full form nasa?
Explain the volatile and mutable keywords.
Write any small program that will compile in "C" but not in "C++"
How do you show the declaration of a virtual constructor?