2078 10

BIT153 ยท 2078 ยท 5 marks

Explain pure virtual functions with example.

Explain pure virtual functions with example. [5]

Object Oriented ProgrammingChapter 8: Static and Dynamic PolymorphismPure virtual functions

A pure virtual function is a virtual function that has no implementation in the base class and is declared by assigning = 0 in its declaration. It forces every derived class to provide its own implementation of that function. Syntax: --- Feature Description ------ Declaration Uses = 0 at the end ...