Inheritance is a way to implement IS-A relationship i.e. parent child relationship. Subclass inherits the super class properties like data member, methods. Inheritance is the way of re-usability of code. Let us take the example of parent and child. A child inherits the properties of its parent.