State Characteristics of Friend Function. - Computer Science 1

Advertisements
Advertisements

State characteristics of Friend Function.

Advertisements

Solution

(1) It is not in the scope of the class to which it has been declared as friend.
(2) Since it is not in the scope of a class, it cannot be called using the object of that class.
(3) It can be invoked like a normal function without the help of any object.
(4) Unlike member functions, it cannot access the member names directly and has to use an object name and dot membership operator with each member name.
(5) It can be declared either in the public or the private part of a class without affecting its meaning.
(6) It has the objects as arguments.

Concept: C++ Programming
  Is there an error in this question or solution?
2015-2016 (March)
Share
Notifications



      Forgot password?
Use app×