Home » C++ Programming » Functions » Question
  1. Where does keyword ‘friend’ should be placed?
    1. function definition
    2. main function
    3. function declaration
    4. All of above
    5. None of these
Correct Option: C

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.



Your comments will be displayed only after manual approval.