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 is the best way to take screenshots of a window with c++ in windows?
What's the order in which the local objects are destructed?
what do you mean by volatile variable?
Why do we use setw in c++?
What's the hardest coding language?
Mention the purpose of istream class?
What is a wchar_t in c++?
Are c and c++ different?
Explain differences between alloc() and free()?
What are the main features of c++?
Can c++ be faster than c?
What relational operators if statements in c++?
What is a c++ map?
Write about an iterator class?
How do you invoke a base member function from a derived class in which you’ve overridden that function?