What is abstract class in c?
C is not an object-oriented programming language and therefore hasno concept of abstract classes.
In C++, however, an abstract class is a base class that declaresone or more pure-virtual functions. An abstract base class is alsoknown as an abstract data type (ADT). Pure-virtual functions differfrom virtual functions in that virtual functions are expected to beoverridden (but needn't be) while a pure-virtual function must beoverridden (but needn't be implemented by the ADT). Once overriddenby a derived class, the function reverts to being a virtualfunction with respect to further derivatives. However, only classesthat provide or inherit a complete implementation of thepure-virtual interface can be instantiated in their own right;those that do not are themselves abstract data types.
No comments:
Post a Comment