Q. What is the purpose of the 'friend' function in C++?
β
Correct Answer: (A)
To allow access to private and protected members of a class
Explanation: A 'friend' function in C++ can access private and protected members of a class.