What do you mean by friend function in C++ ?5
1286 5b5cc6d6e4d2b4197774e683
Q: What do you mean by friend function in C++ ?
- Show Answer
- Workspace
- Discuss
Answer :
Explanation :
Friends can be either functions or other classes. The class grants friends unlimited access privileges. * The declaration of the function should be preceded by the keyword 'friend'.* The function definition will not use the keyword or the scope operator '::'. Thus, a friend function is an ordinary function or a member of another class.
Similar Questions
Since Nithya and Suganya exchange places, so Rita’s new position is the same as Monika’s earlier position. This position is 17th from the right and 10th from the left. Therefore Number of girls in the row = (16 + 1 + 9) = 26.