Redirected
in Object Oriented Programming edited by
5,260 views
4 votes
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 edited by
5.3k views

1 Answer

3 votes
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

Related questions

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