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 the main purpose of overloading operators?
What is one dimensional array in c++?
What does override mean in c++?
To what does “event-driven” refer?
What are virtual functions in c++?
Would you rather wait for quicksort, linear search, or bubble sort on a 200000 element array? (Or go to lunch...) a) Quicksort b) Linear Search c) Bubble Sort
What is the best book for c++ beginners?
What is null pointer and void pointer?
What is the main purpose of c++?
const char * char * const What is the differnce between the above two?
What is a unnitialised pointer?
How can you prevent accessing of the private parts of my class by other programmers (violating encapsulation)?