πŸ“Š C++
Q. What is the purpose of the 'friend' function in C++?
  • (A) To allow access to private and protected members of a class
  • (B) To create multiple objects of a class
  • (C) To inherit a class
  • (D) To define a global function
πŸ’¬ Discuss
βœ… Correct Answer: (A) To allow access to private and protected members of a class

Explanation: A 'friend' function in C++ can access private and protected members of a class.

Explanation by: Admin
A 'friend' function in C++ can access private and protected members of a class.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
185
Total Visits
πŸ“½οΈ
1 y ago
Published
πŸŽ–οΈ
Admin
Publisher
πŸ“ˆ
94%
Success Rate