Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


What is a friend function & its advantage?

Answers were Sorted based on User's Feedback



What is a friend function & its advantage?..

Answer / supriya

friend function is the one that can access the private data
members of the class to which it is made as friend. this is
advantageous when any class needs any computation which
requires the private data members of two different classes.
in such case that class can be made as friend to both the
classes whose data it needs

Is This Answer Correct ?    27 Yes 4 No

What is a friend function & its advantage?..

Answer / devi

The above ans is also right.
->Friend function is the one that can access the private
data members of the same class and other class which it is
made as friend.
->The advantageous of friend function that function not called
by object of the class.
->That means without using object name and dot operator that call the friend function.It
can define private area and public area.
->The friend function define outside the class without using
the class name and scope resolution operator.

Is This Answer Correct ?    16 Yes 7 No

Post New Answer

More OOPS Interview Questions

can we make game by using c

1 Answers   SmartData,


polymorphism means?

6 Answers   BFL,


What is class and object with example?

0 Answers  


What is the difference between inheritance and polymorphism?

0 Answers  


Why multiple inheritance is not possible?

0 Answers  


what is an instance of a class

5 Answers  


What is the concept of object oriented program?

6 Answers  


What is the real time example of inheritance?

0 Answers  


why we are declare the function in the abstract class even though we are declaring it in Derived class?

1 Answers   TCS,


What are different oops concepts?

0 Answers  


write a program in c++ to overload the function add (s1,s2) where s1 and s2 are integers and floating point values.

4 Answers  


There are two base class B1,B2 and there is one class D which is derived from both classes, Explain the flow of calling constructors and destructors when an object of derived class is instantiated.

0 Answers  


Categories