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

Why multiple inheritance is not possible?

604


What is debug class?what is trace class? What differences are between them? With examples.

1612


What is the highest level of cohesion?

581


How long to learn object oriented programming?

568


Are polymorphisms mutations?

705






What is oops concept with example?

582


Will I be able to get a picture in D drive to the c++ program? If so, help me out?

1661


What is class in oop with example?

625


can inline function declare in private part of class?

3663


What is encapsulation with example?

583


What is oops in programming?

570


What causes polymorphism?

577


What is polymorphism and types?

605


Whats oop mean?

601


Why is oop useful?

604