CoolInterview.com - World's Largest Collection of Interview Questions
Send Free SMS
 Interview Questions  
 Our Services  


INTERVIEW QUESTIONS LANGUAGES C++ DETAILS
Question :
What is friend function?
Category C++ Interview Questions
Rating (3.5) By 6 users
Added on 10/22/2004
Views 5194
Rate it!
Answers:

As the name suggests, the function acts as a friend to a class. As a friend of a class, it can access its
private and protected members. A friend function is not a member of the class. But it must be listed in the class definition.



A non membered function which declared in class defination through which we can access the private and protected data members of a class is called a friend function.



 Posted by: baji    

Contact baji  Contact baji

A friend function is a global function that can access all data members of a class.



 Posted by: seema    

Contact seema  Contact seema


If you have the better answer, then send it to us. We will display your answer after the approval.
Name :*
Email Id :*
Answer :*
Verification Code Code Image - Please contact webmaster if you have problems seeing this image code Not readable? Load New Code
Process Verification  Enter the above shown code:*
Inform me about updated answers to this question

   
Related Questions
View Answer
What are virtual functions?
View Answer
What is a scope resolution operator?
View Answer
What do you mean by inheritance?
View Answer
What is polymorphism? Explain with an example?
View Answer
What is the difference between an object and a class?
View Answer
What is encapsulation?
View Answer
What is abstraction?
View Answer
What do you mean by binding of data and functions?
View Answer
Difference between realloc() and free()?
View Answer
What is function overloading and operator overloading?
View Answer

Please Note: We keep on updating better answers to this site. Subscribe to our newsletter to get notified when better answer is posted.

Notify me when better answer is posted!
Email:

View ALL C++ Interview Questions

User Options
Sponsored Links


Copyright ©2003-2010 CoolInterview.com, All Rights Reserved.
Privacy Policy | Terms and Conditions
Page URL: http://www.coolinterview.com/interview/955/default.asp?cachecommand=bypass


Download Yahoo Messenger | Placement Papers| FREE SMS | ASP .Net Tutorial | Web Hosting | Free SMS | Dedicated Servers | Joke of the Day

0.62