2080.1 8

Object Oriented Programming2080.15 marksFriend functions

What is friend function? Write a program to add any two private numbers of two different classes using friend function. [1+4]

What is friend function? Write a program to add any two private numbers of two different classes using friend function. [1+4]

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. A friend function can be a friend of more than one class at the same time, which allows it to access private...

Up nextWhat is operator overloading? Explain with an example.