search
Log In
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
4 votes
2.6k views

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
retagged by
2.6k 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

Related questions

0 votes
2 answers
1
149 views
A default catch block catches, [A]. all thrown objects [B]. no thrown objects [C]. any thrown object that has not been caught by an earlier catch block [D]. all thrown objects that have been caught by an earlier catch block
asked May 19, 2019 in Programming logan1x 149 views
1 vote
0 answers
2
105 views
Please tell why the answer is C, why not A or B?
asked Nov 12, 2018 in Compiler Design Balaji Jegan 105 views
2 votes
1 answer
3
1.9k views
When the inheritance is private, the private methods in base class are _____ in the derived class (in C++) inaccessible accessible protected public
asked Jul 30, 2016 in Object Oriented Programming jothee 1.9k views
1 vote
2 answers
4
1.7k views
Which of the following is incorrect in C++? when we write overloaded function we must code the function for each usage when we write function template we code the function only once it is difficult to debug macros templates are more efficient than macros
asked Jul 30, 2016 in Object Oriented Programming jothee 1.7k views
...