What is a friend function & its advantage?



What is a friend function & its advantage?..

Answer / kishor khatri

A friend function is a non member function of a class, that
is declared as a friend using the keyword "friend" inside
the class. By declaring a function as a friend, all the
access permissions are given to the function. It is like
allowing access to ones personal belongings to a friend.

Is This Answer Correct ?    3 Yes 1 No

Post New Answer

More OOPS Interview Questions

What is encapsulation process?

0 Answers  


In multilevel inheritance constructors will be executed from the .... class to ... class

2 Answers   ABCO, TCS,


What is difference between polymorphism and inheritance?

0 Answers  


3. Differentiate verification and validation.

1 Answers  


What is the difference between the c++ & java?

2 Answers  






Where is pseudocode used?

0 Answers  


What is multiple inheritance? Give Example

6 Answers   Mind Tree,


What is inheritance write a program to show use of inheritance?

0 Answers  


What is a class in oop?

0 Answers  


Can we have a private virtual method ?

8 Answers   Ness Technologies,


What is the importance of oop?

0 Answers  


What is abstraction in oop?

0 Answers  


Categories