diff between Virtual mathod and abstract method?



diff between Virtual mathod and abstract method?..

Answer / pawan kumar

Virtual methods have an implementation and provide the derived classes with the option of overriding it. Abstract methods do not provide an implementation and force the derived classes to override the method. So, abstract methods have no actual code in them, and subclasses HAVE TO override the method.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More OOPS Interview Questions

What is polymorphism give a real life example?

0 Answers  


What is a class?

32 Answers   Infosys, TCS, Thylak,


Why static Function is used in C++?

4 Answers   TCS,


The type of variable a pointer points to must be the part of pointer's definition so that:

1 Answers   Infosys,


What is Dynamic Polymorphism?

13 Answers  


What is destructor example?

0 Answers  


//what is wrong with the programme?? #include<iostream.h> template <class first> class dd { first i; public: void set(); void print(); }; void dd< first>:: set() { cin>>i; } void dd< first>::print() { cout<<"\n"<<i; } void main() { dd <char>g; g.set(); g.print(); }

1 Answers  


Explain the advantages of inheritance.

0 Answers   TCS,


What is abstrac class?where is it use?

2 Answers  


What are oops functions?

0 Answers  


what is the definition of incapsulation

2 Answers  


what is a ststic variable and stiticfunction briefly explain with exmple and in which case we use

2 Answers   HCL,


Categories