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 a container class? What are the types of container classes in c++?
What is the best book for c++ beginners?
Describe about storage allocation and scope of global, extern, static, local and register variables?
Can turbo c++ run c program?
How to demonstrate the use of a variable?
What is the last index number in an array of 100 characters a) 100 b) 99 c) 101
What is c++ map?
Write a program to calculate the BMI of a person using the formula BMI = weight/height2.
What does new return if there is insufficient memory to make your new object?
What is OOPs
Is it legal in c++ to overload operator++ so that it decrements a value in your class?
What is the handle class?