What is friend function?

Answer Posted / lakshmi.t

If a class B is derived from A, we can access the data and
member function of A.So in order to access a class data or
function from another class we have to derive the class.
but this can be done by declaring a class as 'friend' and
can access the another class functions and data.

Is This Answer Correct ?    26 Yes 8 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is polymorphism and why is it important?

554


Describe these concepts: Polymorphism, Inheritance and Abstraction.

604


class type to basic type conversion

1833


What is an advantage of polymorphism?

585


What is overloading in oops?

591






What are main features of oop?

623


What is the problem with multiple inheritance?

578


What are properties in oop?

597


What is static modifier?

625


What does <> mean pseudocode?

618


State what is encapsulation and friend function?

689


What is balance factor?

576


What does it mean when someone says I oop?

574


What makes a language oop?

590


What is polymorphism and its types?

587