If class B inherits class A privately. And class B has a friend function. Will the friend function be able to access the private member of class A?
(a) Yes, because friend function can access all the members
(b) Yes, because friend function is of class B
(c) No, because friend function can only access private members of friend class
(d) No, because friend function can access private member of class A also
I had been asked this question by my school principal while I was bunking the class.
I want to ask this question from Access Specifiers topic in division Access Specifiers of Object Oriented Programming