C++ program to demonstrate example of friend function with class
Friend Function
Friend function is a special type of function, which declares inside the class. Friend function can access the private, protected and public data of the class.
A keyword friend is used before return type of the function declaration/prototype.
Friend function program in C++
Output
need an explanation for this answer? contact us directly to get an explanation for this answer