The Gateway to Computer Science Excellence
+4 votes

Which one of the following is correct, when a class grants friend status to another class?

  1. The member functions of the class generating friendship can access teh members of the friend class
  2. All member functions of the class granted friendship have unrestricted access to the members of the class granting the friendship 
  3. Class friendship is reciprocal to each other
  4. There is no such concept
in Object Oriented Programming by Veteran (105k points)
retagged by | 1.3k views

1 Answer

+3 votes
B is true  the functions of  a class which is given  friend status by another class can access all its pvt , protected , public members

class friendship is not commutative or transitive unless explicitly specified
by Boss (49.3k points)
Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
50,737 questions
57,291 answers
104,889 users