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
Write a note about the virtual member function?
Should you pass exceptions by value or by reference?
Do class method definitions?
Why cout is used in c++?
Please explain the reference variable in c++?
Out of fgets() and gets() which function is safe to use and why?
How the endl and setw manipulator works?
What are the four main data types?
Is it possible for the objects to read and write themselves?
Why do we use structure in c++?
In a function declaration what does extern means?
Write about the various sections of the executable image?
Can I learn c++ without c?
What are the extraction and insertion operators in c++? Explain with examples.
Why we use #include conio h in c++?