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

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How is objective c different from c++?

784


What doescout<<(0==0) print out a) 0 b) 1 c) Compiler error: Lvalue required

563


What's the best free c++ profiler for windows?

610


How we can differentiate between a pre and post increment operators during overloading?

583


give me an example for testing a program showing the test path .show how the test is important and complex.

2415






Describe the process of creation and destruction of a derived class object?

634


Describe private, protected and public?

590


How does c++ sort work?

549


What are the two main components of c++?

578


Explain the static storage classes in c++.

693


What are c++ redistributables?

552


What is a singleton class c++?

538


What are containers in c++?

558


Write about the stack unwinding?

616


What is iterator c++?

536