Question OOP-ENC-0012
MediumWhat is a friend function in C++?
- A.
A function that is always public
- B.
A member function of two classes
- C.
Sign up free to see the answer and a step-by-step explanation.
Popular companies
Prepare company by company
Hiring pattern, syllabus, past questions and mocks for each company.
All companiesPractice by subject
Encapsulation question
What is a friend function in C++?
A function that is always public
A member function of two classes
Sign up free to see the answer and a step-by-step explanation.
A virtual function
A non-member function given access to a class's private and protected members