What are the characteristics
of friend functions?
Latest answer: A friend function is not in the scope of the
class n which it has been declared as friend.
It cannot be called using the object of that class..................
Read
answer
What is a friend function?
Latest answer: Private data members cannot be accessed from
outside the class. However, situations arise where two classes need to share a
particular function. For such situations, C++ introduces friend
functions...................
Read answer
Explain the advantages of
using friend classes.
Latest answer: There are situations when private data members
need to be accessed and used by 2 classes simultaneously. In these kind of
situations we can introduce friend functions which have an access
to..................
Read
answer
List down the guideline that
should be followed while using friend function.
Latest answer: When the application is needed to access a
private member of another class, the only way is to utilize the friend
functions. The following are the guidelines to handle friend
functions....................
Read
answer
Latest answer: The friend function is a ‘non
member function’ of a class. It can access non public members of the class. A
friend function is external to the class definition...............
Read answer
|