102k views
1 vote
private members of a class are accessible only from _____________ of the same class or from their friends

User Crypticsy
by
5.5k points

1 Answer

4 votes

Answer: Within other member

Step-by-step explanation:

The private data member is also known as private function in the computer programming language. The private keyword is basically used to specify the access level and also provide the variable and the methods control to the programmers in the class.

In the class, the variables and the method are directly access by the other methods with the same class but not directly access by the derived class. Therefore, the private members of the class are easily access from the other member of the similar class and also from friends.

User Deen John
by
5.3k points