Ans: It is a common practice to inherit a class publicly, for example,
class der : public base
{
—-
} ;
What happens if a class is inherited protectedly?
class der : protected base
{
—-
} ;
In such cases all public and protected member functions become protected in the derived class, whereas, private functions remain private to derived class.
When a class in inherited privately, all the public and protected member functions become private to the derived class.