πŸ“Š C++
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
πŸ’¬ Discuss
βœ… Correct Answer: (A) friend void myFunction();

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

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

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
136
Total Visits
πŸ“½οΈ
1 y ago
Published
πŸŽ–οΈ
Priyanka Tomar
Publisher
πŸ“ˆ
88%
Success Rate