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
What can I use instead of namespace std?
Is c++ the best programming language?
Explain terminate() and unexpected() function?
What does return 0 do in c++?
What is endl c++?
What is c++ map?
Is atoi safe?
Is c# written in c++?
How many keywords are used in c++?
what is data abstraction in C++?
What is null pointer and void pointer?
How a new operator differs from the operator new?
What is a pointer how and when is it used?
What is a dll entry point?
Tell me can a pure virtual function have an implementation?