what is the difference between virtual function and
destoctor?
Answer Posted / prabhakar
virtual function is just like a member function of a class.it is used to over loading mechanisam.it can be acesses by any object of either base class or derived class.
destructor is used to dellocate the memory of an object.it can call by using delete operator.
| Is This Answer Correct ? | 3 Yes | 0 No |
Post New Answer View All Answers
Why do we use polymorphism in oops?
What is abstraction and encapsulation?
What is polymorphism in oops with example?
What is a class in oop?
What is polymorphism and its types?
What is this pointer in oop?
Can destructor be overloaded?
What is coupling in oops?
What is coupling in oop?
What is advantage of inheritance?
when to use 'mutable' keyword and when to use 'const cast' in c++
What is polymorphism explain?
class type to basic type conversion
What does and I oop and sksksk mean?
c++ program to swap the objects of two different classes