retagged by
5,154 views

1 Answer

Best answer
3 votes
3 votes

In object oriented programming, a friend function that is a "friend" of a given class is allowed access to private and protected data in that class that it would not normally be able to as if the data was public.Normally, a function that is defined outside of a class cannot access such information. Declaring a function a friend of a class allows this, in languages where the concept is supported.

Hence,Option(C)Allow one class to access an unrelated class.

selected by
Answer:

Related questions

3.7k
views
1 answers
0 votes
makhdoom ghaya asked Sep 24, 2016
3,673 views
If a function is friend of a class, which one of the following is wrong ?A function can only be declared a friend by a class itself.Friend functions are not ... a class.It can have access to all members of the class, even private ones.
1.4k
views
2 answers
0 votes
makhdoom ghaya asked Jul 11, 2016
1,439 views
The syntax of capturing events method for document object isCaptureEvents() CaptureEvents(Orgs eventType)CaptureEvents(eventType)CaptureEvents(eventVal)
2.0k
views
1 answers
0 votes
makhdoom ghaya asked Jul 11, 2016
1,999 views
The pure object oriented programming language with extensive metadata available and modifiable at run time isSmall talkC++ JavaEiffel
2.1k
views
0 answers
0 votes
makhdoom ghaya asked Jul 11, 2016
2,099 views
The "part-whole”or "a-part-of", relationship in which objects representing the components of something associated with an object representing the entire assembly is called asAssociationAggregationEncapsulationGeneralisation