Home » C++ Programming » Functions » Question
  1. Which rule will not affect the friend function?
    1. private and protected member can be accessed anywhere
    2. protected member can be accessed anywhere
    3. private and protected members of a class cannot be accessed from outside
    4. All of above
    5. None of these
Correct Option: C

Friend is used to access private and protected members of a class from outside the same class.



Your comments will be displayed only after manual approval.