Friend function
Appearance
Friend Function in Object-Oriented Programming acts as a friend to a class. It is a non-member function of a class. It is declared as a friend using the keyword 'friend' inside the class. By declaring so, all the access permissions are given to the function. This implies, a friend function can access all public, private and protected data of a class.