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

How would you obtain segment and offset addresses from a far address of a memory location?

0 Answers  


What are namespaces in c++?

0 Answers  


Is c++ an integer?

0 Answers  


What is the difference between strcpy() and strncpy()?

0 Answers  


Explain rtti.

0 Answers  






Explain how to initialize a const data member.

0 Answers  


What's the most powerful programming language?

0 Answers  


Is c++ the hardest programming language?

0 Answers  


What is long in c++?

0 Answers  


Explain the use of this pointer?

0 Answers  


What is Namespace?

5 Answers   HCL, Samsung,


the maximum length of a character constant can be a) 2 b) 1 c) 8

0 Answers  


Categories