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

Inline parameters : What does the compiler do with the parameters of inline function, that can be evaluated in runtime ?

2011


What are the types of array in c++?

616


What should main() return in c and c++?

520


How do we implement inheritance in c++?

582


What is the header file for setw?

571






What is a pointer how and when is it used?

570


How do I get good at c++ programming?

592


What are c++ redistributables?

554


Explain the advantages of using friend classes.

574


What are all predefined data types in c++?

554


Are vectors faster than arrays?

567


Write a program to concatenate two strings.

580


Can java be faster than c++?

664


Draw a flow chart and write a program for the difference between the sum of elements with odd and even numbers. Two dimensional array.

5893


What are the advantages of using a pointer?

600