Can a friend function be a member function of another class? 

  • Always 
  • Never 
  • Only if it's a static member function. 
  • Yes, if it's declared as a friend in the original class.
A friend function can indeed be a member function of another class. In this context, one class allows a member function of another class to access its private and protected members by declaring that member function as a friend.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *