Discussion Forum : Friends
Question -

Where does keyword ‘friend’ should be placed?

Options:
A .  function declaration
B .  function definition
C .  main function
D .  None of the mentioned
Answer: Option A

The keyword friend is placed only in the function declaration of the friend function and not in 

the function definition because it is used toaccess the member of a class.



Was this answer helpful ?
Next Question
Submit Your Solution hear:

Your email address will not be published. Required fields are marked *