Sail E0 Webinar
Question

What is the syntax of friend function?


Options:
A .  friend class1 Class2;
B .  friend class;
C .  friend class
D .  None of the mentioned
Answer: Option A

In option a, the class2 is the friend of class1 and it can access all the private and protected 

members of class1.



Was this answer helpful ?
Next Question

Submit Solution

Your email address will not be published. Required fields are marked *

Latest Videos

Latest Test Papers