GeekInterview.com
Series: Subject:
Question: 47 of 271

merits and demerits of friend function

Asked by: Interview Candidate | Asked on: Jun 5th, 2006
Showing Answers 1 - 2 of 2 Answers
Prabhu Kumar V a

Answered On : Jun 14th, 2006

merits:

   we can able to access the other class members in our class if,we use friend keyword.

   we CAN access the members without inheriting the class.

demerits:

  Maximum size of the memory will occupied by objects according to the size of friend Members.

  we cant do any run time ploymorphism concepts in those members.

 

  
Login to rate this answer.
yogesh anasane

Answered On : Nov 21st, 2012

1) Sometimes a friend function allows a more obvious syntax for calling a function rather than what a member function can do.
2) Friend function is used to increase versatility of overload operator.

  
Login to rate this answer.

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

Related Open Questions

Ads

Connect

twitter fb Linkedin GPlus RSS

Ads

Interview Question

 Ask Interview Question?

 

Latest Questions

Interview & Career Tips

Get invaluable Interview and Career Tips delivered directly to your inbox. Get your news alert set up today, Once you confirm your Email subscription, you will be able to download Job Inteview Questions Ebook . Please contact me if you there is any issue with the download.