What is syntax of friend function ?
Answers
Answered by
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
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
Biology,
2 months ago
Economy,
2 months ago
Biology,
2 months ago
History,
4 months ago
Hindi,
4 months ago
Computer Science,
11 months ago
Psychology,
11 months ago