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

Explain the difference between abstract class and interface in c++?

0 Answers  


What does it mean to declare a destructor as static?

0 Answers  


What is wrapper class in c++?

0 Answers  


Define what is constructor?

0 Answers  


What do c++ programmers do?

0 Answers  






What happens if an exception is throws from an object's constructor and from object's destructor?

3 Answers   TCS,


What is a parameterized type?

1 Answers  


List out some of the OODBMS available?

1 Answers  


Eplain extern keyword?

0 Answers  


What is an explicit constructor?

1 Answers  


Explain the uses oof nested class?

0 Answers  


Explain "const" reference arguments in function?

0 Answers  






Categories