1.

Which rule will not affect the friend function?(a) private and protected members of a class cannot be accessed from outside(b) private and protected member can be accessed anywhere(c) protected member can be accessed anywhere(d) private member can be accessed anywhere

Answer» Right option is (a) private and protected members of a class cannot be accessed from outside

To explain I would say: Friend is used to access private and protected members of a class from outside the same class.


Discussion

No Comment Found

Related InterviewSolutions