Answer Posted / nakul kumar
The simple answer is that a virtual destructor is one that is declared with the virtual attribute.
The behavior of a virtual destructor is what is important. If you destroy an object through a baller or reference to a base class, and the base-class destructor is not virtual, the derived-class destructors are not executed, and the destruction might not be complete.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What is a binary file? List the merits and demerits of the binary file usagein C++.
What are abstract data types in c++?
What is the use of default constructor?
Is oops and c++ same?
Why do we need c++?
What is c++ 11 and c++ 14?
What character terminates all character array strings a) b) . c) END
Why is c++ a mid-level programming language?
What is difference between malloc()/free() and new/delete?
Is arr and &arr are same expression for an array?
Out of fgets() and gets() which function is safe to use and why?
What is ofstream c++?
Write some differences between an external iterator and an internal iterator?
Write about a nested class and mention its use?
Which programming language is best to learn first?