A friend function can be a friend of two classes.

Options
- True
- False


CORRECT ANSWER : True

Discussion Board
C++ - Friend Function

Yes, the above answer is true. A friend function can be a friend of two classes. If a function is defined as a friend function, the private and protected data of a class can be accessed using the function. The compiler knows a given function is a friend function by the use of the keyword friend.

Prajakta Pandit 01-27-2017 01:40 AM

Write your comments


Enter the code shown above:

(Note: If you cannot read the numbers in the above image, reload the page to generate a new one.)


Advertisement