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

Answer Posted / truong

1. If exception is thrown in the constructor, the destructor will be not called.
2. If exception is thrown in the destructor of a static object, exception will be catch in the main.

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do I make turbo c++ full screen?

588


Explain 'this' pointer and what would happen if a pointer is deleted twice?

613


What is the use of endl?

550


What is virtual destructor? What is its use?

580


Is map thread safe c++?

637






What are the different types of polymorphism in c++?

596


Difference between declaration and definition of a variable.

591


What is the main function c++?

604


What is the use of seekg in c++?

601


Does c++ support exception handling?

600


What is an operator function? Describe the function of an operator function?

621


How is c++ used in the real world?

577


How do you find out if a linked-list has an end? (I.e. The list is not a cycle)

607


Write a C/C++ program that connects to a MySQL server and checks if the InnoDB plug-in is installed on it. If so, your program should print the maximum number of concurrent threads that the InnoDB plug-in can create

2078


Differentiate between the message and method in c++?

612