1.

What is the difference between public and private visibility mode?

Answer»

Private visibility mode:

When a base class is inherited with private visibility mode the public and protected members of the base class become ‘private’ members of the derived class.

Public visibility mode:

When a base class is inherited with public visibility mode, the protected members of the base class will be inherited as protected members of the derived class and the public members of the base class will be inherited as public members of the derived class



Discussion

No Comment Found