What is the difference between virtual functions and pure virtual functions?



What is the difference between virtual functions and pure virtual functions?..

Answer / hrpynux@gmail.com

A virtual function is a member function of base class which can be redefined by derived class. A pure virtual function is a member function of base class whose only declaration is provided in base class and should be defined in derived class otherwise derived class also becomes abstract.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C++ Interview Questions

What are the advantages/disadvantages of using #define?

0 Answers   Amazon,


Can we use THIS Pointer in static function – Reason in C++?

0 Answers  


Explain encapsulation in C++.

0 Answers   Verifone,


What is the difference between virtual functions and pure virtual functions?

1 Answers  


What is a COPY CONSTRUCTOR and when is it called?

0 Answers   IBS,


How many times will this loop execute? Explain your answer.

0 Answers  


CDPATH shell variable is in(c-shell)

0 Answers   Siemens,


What does malloc return in C and C++?

0 Answers   Alter,


What is a virtual base class?

6 Answers   Fidelity, Siemens,


What are the advantages and disadvantages of B-star trees over Binary trees?

0 Answers  


Explain the importance of method overloading in C++?

0 Answers   Akamai Technologies, Infogain,


In C++ what is the meaning of data hiding?

0 Answers   Aricent,


Categories