C++ Programming Question:
Download Questions PDF

What is friend function in C++?

C++ Programming Interview Question
C++ Programming Interview Question

Answer:

As the name suggests, the function acts as a friend to a class. As a friend of a class, it can access its private and protected members. A friend function is not a member of the class. But it must be listed in the class definition.

Download C++ Programming Interview Questions And Answers PDF

Previous QuestionNext Question
What is a C++ class?Which recursive sorting technique always makes recursive calls to sort subarrays that are about half size of the original array?