Which C++ keyword gives a non-member function access to the private members of a class?
Correct answer B. friend
Explanation
A function declared as a friend inside a class can access that class's private and protected members, even though it is not a member.
Answer checked How we write and check questions
Discussion