Which rule will not affect the friend function?
A. private and protected members of a class cannot be accessed from outside
B. private and protected member can be accessed anywhere
C. both a & b
D. None of the mentioned
Answer:A
Which rule will not affect the friend function?
A. private and protected members of a class cannot be accessed from outside B. private and protected member can be accessed anywhere C. both a & b D. None of the mentioned
Explanation:Friend is used to access private and protected members of a class from outside the same class.