Technical Discussion :: C++
Home > Freshers > Technical Interview Questions > C++
23. What is meant by visibility mode explain briefly?
Answer:
Visibility mode is optional and may be either private or public. The default visibility mode is private. Visibility mode specifies whether the features of the base class are privately derived or publicly derived.
Ex:
Class abc: private Xyz // private derivation
{
members of abc;
};
Ex:
Class abc: private Xyz // public derivation
{
members of abc;
};
Asked In :: Sopra Steria
Visibility mode is optional and may be either private or public. The default visibility mode is private. Visibility mode specifies whether the features of the base class are privately derived or publicly derived.
Ex:
Class abc: private Xyz // private derivation
{
members of abc;
};
Ex:
Class abc: private Xyz // public derivation
{
members of abc;
};
Ex:
Class abc: private Xyz // private derivation
{
members of abc;
};
Ex:
Class abc: private Xyz // public derivation
{
members of abc;
};