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 a v-table?
How do you define a class in c++?
What is the use of setprecision in c++?
Does there exist any other function which can be used to convert an integer or a float to a string?
How do I tokenize a string in c++?
Do vectors start at 0?
What will strcmp("Astring", "Astring"); return a) A positive value b) A negative value c) Zero
Is java as fast as c++?
If dog is a friend of boy, is boy a friend of dog?
why is c++ called oops? Explain
What is the use of default constructor?
What is size_type?
Can c++ be faster than c?
Would you rather wait for quicksort, linear search, or bubble sort on a 200000 element array? (Or go to lunch...) a) Quicksort b) Linear Search c) Bubble Sort
What will happen if a pointer is deleted twice?