Computer Science, asked by JeevanJean4321, 5 hours ago

How does a friend function access the data member?​

Answers

Answered by anagathalamadhavi601
1

Answer:

A friend function cannot access the private and protected data members of the class directly. It needs to make use of a class object and then access the members using the dot operator. A friend function can be a global function or a member of another class.

Similar questions