Home » C++ Programming » Functions » Question
  1. What is the syntax of friend function?
    1. friend class;
    2. friend class
    3. friend classA ClassB;
    4. All of above
    5. None of these
Correct Option: C

In option a, the classB is the friend of classa and it can access all the private and protected members of classA.



Your comments will be displayed only after manual approval.