Technical Discussion :: C++
Home > Freshers > Technical Interview Questions > C++
78. What is a pure virtual function? And explain with an example.
Answer:
A virtual function, equated to zero is called a pure virtual function. It is a function declared in a base class that has no definition related to the base class.
e.g.: virtual void display () =0;
Asked In :: Accenture Sapient
A virtual function, equated to zero is called a pure virtual function. It is a function declared in a base class that has no definition related to the base class.
e.g.: virtual void display () =0;