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



What happens if an exception is throws from an object's constructor and from object's de..

Answer / rajesh

exception from object's destructor - could terminate the
program while stack unwinding.

Is This Answer Correct ?    2 Yes 0 No

What happens if an exception is throws from an object's constructor and from object's de..

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

What happens if an exception is throws from an object's constructor and from object's de..

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

Post New Answer

More C++ General Interview Questions

What is low level language in simple words?

0 Answers  


What problems might the following macro bring to the application?

0 Answers  


Compare compile time polymorphism and Runtime polymorphism

1 Answers  


What is pointer to member?

0 Answers  


What are the data types in c++?

0 Answers  


Is there any difference between int [] a and int a [] in c++?

0 Answers  


What is the basic difference between C and C++?

0 Answers   NIIT,


Difference between delete and delete[]?

5 Answers   Infosys, TCS, Virtusa,


What is the full form nasa?

0 Answers  


Explain the volatile and mutable keywords.

0 Answers  


Write any small program that will compile in "C" but not in "C++"

10 Answers   Honeywell,


How do you show the declaration of a virtual constructor?

0 Answers  


Categories