Where does keyword ‘friend’ should be placed?
A. function declaration
B. function definition
C. main function
D. None of the mentioned
Answer:A
Where does keyword ‘friend’ should be placed?
A. function declaration B. function definition C. main function D. None of the mentioned
Explanation: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.