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 "pure virtual" functions?

0 Answers   Adobe, Alter, iNautix,


Explain the difference between C and C++.

0 Answers   Accenture,


How to delete array of objects in C++? Proof by C++ code for proper deletion

0 Answers  


What is an abstract class in C++

0 Answers   SwanSoft Technologies,


What is a class in C++?

0 Answers   Amazon, TCS, UGC Corporation,






Write a C++ Program to find Square Root of a number using sqrt() function.

1 Answers  


Write a C++ Program to Find whether given Number is Odd or Even.

1 Answers  


Explain what happens when an exception is thrown in C++.

0 Answers   Amazon,


dynamic scoping is

0 Answers   Siemens,


What is Copy Constructor?

5 Answers   ABC, Siemens,


Write a C++ Program to find Addition of Two Numbers.

1 Answers  


It is possible to build a C++ compiler on top of a C compiler. How would you do this?

0 Answers   Amazon,


Categories