2080 6

Object Oriented Programming20805 marksFriend functions

What is friend function? Write a program to add private member of two different classes using friend function.

What is friend function? Write a program to add private member of two different classes using friend function. [5]

A friend function is a function that is not a member of a class but has access to the private and protected members of that class. It is declared inside the class using the keyword friend, but it is defined outside the class like a normal function. Key Points: - It is declared with the friend key...

Up nextWrite a program to demonstrate returning object from functions in C++.