What is virtual constructor paradigm?

Answer Posted / priyanka kokil

A virtual destructor is one that is declared as virtual in
the base class and is used to ensure that destructors are
called in the proper order. It is to be remembered that
destructors are called in the reverse order of inheritance.
If a base class pointer points to a derived class object
and we some time later use the delete operator to delete
the object, then the derived class destructor is not called.

Is This Answer Correct ?    2 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is c++ manipulator?

555


What is c++ coding?

658


Why namespace is used in c++?

603


Difference between pointer to constant and constant pointer to a constant. Give example.

646


What are the benefits of operator overloading?

682






Explain the use of this pointer?

637


Can a list of string be stored within a two dimensional array?

577


Can you Mention some Application of C/C++?

626


Is c++ slower than c?

574


Is c++ double?

566


What's the most powerful programming language?

596


What are the benefits of pointers?

595


which operator is used for performing an exponential operation a) > b) ^ c) none

606


Discussion on error handling of C++ .

647


Is atoi safe?

601