Friday 24 January 2020

What are the modes of Inheritance? tccicomputercoaching.com


Inheritance is capability of a class to derive properties and characteristics from another class.

Modes of Inheritance

  1. Public mode: If we derive a sub class from a public base class. Then the public member of the base class will become public in the derived class and protected members of the base class will become protected in derived class. Private members of the base class will never get inherited in sub class.
  2. Protected mode: If we derive a sub class from a Protected base class. Then both public member and protected members of the base class will become protected in derived class. Private members of the base class will never get inherited in sub class.
  3. Private mode: If we derive a sub class from a Private base class. Then both public member and protected members of the base class will become Private in derived class. Private members of the base class will never get inherited in sub class.
TCCI is located in Bopal and Satellite in Ahmedabad.

To learn more about Inheritance , C++ , Programming .

Join TCCI @ Bopal and Satellite in Ahmedabad.

Call us @ 98256 18292.

Visit us @ http://tccicomputercoaching.com/

No comments:

Post a Comment