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
Social Sciences,
16 days ago
Physics,
16 days ago
English,
16 days ago
History,
1 month ago
Hindi,
1 month ago
Computer Science,
7 months ago
Psychology,
7 months ago