When a base class is inherited as public by the derived class, what happens to its public members?What happens to its private members? If...

      

When a base class is inherited as public by the derived class, what happens to its public members?What happens to its private members? If the base is inherited as private by the derived class, what happens to its public and private members in computer programming?

  

Answers


Davis
When a base class is inherited as public, the public members of the base becomes public members of the derived class, and the base's private member remains private to the base .If the base is inherited as private , all members of the base becomes private members of the derived class.
Githiari answered the question on February 5, 2018 at 08:24


Next: Why are the following two overloaded functions in C++ inherently ambiguous? int f(int a); int f(int &a);
Previous: Explain what protected means in programming world.

View More Computer Studies Questions and Answers | Return to Questions Index


Exams With Marking Schemes

Related Questions