Multiple choice

A _______________ function can access a class private data, even though it is not a member function of the class.

  1. friend

  2. static

  3. virtual

  4. abstract

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

A friend function is a non-member function that is explicitly granted access to the private and protected members of a class. This is useful for operator overloading and specific utility functions.