Q
Which statement about a C++ friend function is correct?
-
A
It is a member function with public access
-
B
It is inherited by derived classes
-
C
It is not a member of the class but can access the class's private members
-
D
It must be declared virtual
Correct Answer:
C. It is not a member of the class but can access the class's private members
Explanation:
Friendship is granted, not inherited or transitive.