1.

How are private members of a class different from public members?

Answer»

Explanation:

⭕ A public MEMBER is accessible from anywhere outside the class but within a program.

⭕ You can SET and get the value of public variables without any member.

⭕A private member VARIABLE or function cannot be accessed, or EVEN viewed from outside the class.

⭕Only the class and FRIEND functions can access private members.



Discussion

No Comment Found