C++ Friend Question: Download Questions PDF
Where does keyword 'friend' should be placed?
a) function declaration
b) function definition
c) main function
d) None of the mentioned
Answer:
a) function declaration
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.
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.
Download C++ Friend Interview Questions And Answers
PDF