Answers

Question and Answer:

  Home  C++ Friend

⟩ 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) both a & b d) None of the mentioned

a) private and protected members of a class cannot be accessed from outside

Explanation:

Friend is used to access private and protected members of a class from outside the same class.

 222 views

More Questions for you: