What do you mean by pure virtual functions in C++? Give an example?



What do you mean by pure virtual functions in C++? Give an example?..

Answer / hrpynux@gmail.com

A pure virtual function is a virtual function in C++ for which we need not to write any function definition and only we have to declare it. It is declared by assigning 0 in the declaration. An abstract class is a class in C++ which have at least one pure virtual function.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C++ General Interview Questions

What is a storage class? Mention the storage classes in c++.

0 Answers  


What is the difference between public, private, protected inheritance?

12 Answers   Wipro,


What is wrapper class in c++?

0 Answers  


How to declare a function pointer?

0 Answers  


What compiler was used?

6 Answers   Intel,


Evaluate as true or false: !(1 &&0 || !1) a) True b) False c) Invalid statement

0 Answers  


What is linked list in c++?

0 Answers  


What is the difference between mutex and binary semaphore?

0 Answers  


What is std::move?

1 Answers  


Which one is a preferred language C or C++? Why?

0 Answers  


Give 10 points of differences between C & C++.

0 Answers   HCL,


What are the differences between a struct and a class in C++?

7 Answers   Amazon, Wipro,


Categories