Computer Science, asked by smileysandhu, 1 month ago

What is syntax of friend function ? ​

Answers

Answered by khansameer31423
2

Answer:

A friend function in C++ is a function that is preceded by the keyword “friend”. When the function is declared as a friend, then it can access the private and protected data members of the class. A friend function is declared inside the class with a friend keyword preceding as shown below. class className{ ……

Answered by mishrasheetal03
1

Answer:

A friend function in C++ is a function that is preceded by the keyword “friend”. When the function is declared as a friend, then it can access the private and protected data members of the class. A friend function is declared inside the class with a friend keyword preceding as shown below. class className{ ……

Similar questions