What is friend function?

friend function

– Friend function is a friend of a class.
– It is allowed to access Public, private or protected data of that class.
– It can be declared anywhere in the class declaration
– It doesn’t have any effect of access control keywords like private, public or protected.