Multiple choice

Which one of the following statements is incorrect about friend functions?

  1. Declaration of a friend function in private or public section makes a difference to its meaning.

  2. It lies outside the scope of a class to which it is a friend.

  3. Unlike member functions, it can't access member names directly.

  4. It can be invoked without the help of any object.

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

Friend functions are declared inside a class but defined outside. They're not affected by public/private/protected sections - placement makes no difference to meaning. They're not member functions, so they need object references to access members, and can be called independently.