can anyone explain whether this is correct or else help me to write a proper answer plsss
answer.................
Private data members cannot be accessed outside the class. When a class inherits a base class, all the data members except the private get inherited into it. So if we want data members to be accessible to only derived classes and not privately or publicly accessible, then we can use protected.