What is a virtual destructor?
Answers were Sorted based on User's Feedback
Answer / munendra 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 pointer 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 |
Answer / 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 |
What do you mean by storage classes?
Give the difference between the type casting and automatic type conversion. Also tell a suitable C++ code to illustrate both.
what is static function
What is c++ virtual inheritance?
What does int * mean in c++?
How would you find out if a linked-list is a cycle or not?
How one would use switch in a program?
Explain terminate() and unexpected() function?
Write about c++ storage classes?
What is private inheritance?
What is a unnitialised pointer?
When a function is made inline. Write the situation where inline functions may not work.