1.

Explain The Concept Of Friend Function In C++?

Answer»

The friend function in C++ refers to a class or function that WORKS with the private or protected members of the other class. It gets privileges to ACCESS and work with the private members of the other class. The programmer has full CONTROL over both the friend and member FUNCTIONS of the class and can use the features of both. The friend function does not require the use of an object and can be invoked WITHOUT creating the object.

The friend function in C++ refers to a class or function that works with the private or protected members of the other class. It gets privileges to access and work with the private members of the other class. The programmer has full control over both the friend and member functions of the class and can use the features of both. The friend function does not require the use of an object and can be invoked without creating the object.



Discussion

No Comment Found