P

Priyanka Tomar • 35.28K Points
Coach

Q. Which of the following is the correct way to define a friend function in C++?

  • (A) friend void myFunction();
  • (B) void friend myFunction();
  • (C) Both A and B
  • (D) None of the above
  • Correct Answer - Option(A)
  • Views: 99
  • Filed under category C++

Explanation by: Priyanka Tomar
The correct way to define a friend function is 'friend void myFunction();'.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.


Question analytics