C++ Friend function interview questions and answers


C++ Friend function interview questions

<<Previous  Next>>

What are the characteristics of friend functions?

Latest answer: A friend function is not in the scope of the class n which it has been declared as friend.
It cannot be called using the object of that class..................
Read answer

What is a friend function?

Latest answer: Private data members cannot be accessed from outside the class. However, situations arise where two classes need to share a particular function. For such situations, C++ introduces friend functions...................
Read answer

Explain the advantages of using friend classes.

Latest answer: There are situations when private data members need to be accessed and used by 2 classes simultaneously. In these kind of situations we can introduce friend functions which have an access to..................
Read answer

List down the guideline that should be followed while using friend function.

Latest answer: When the application is needed to access a private member of another class, the only way is to utilize the friend functions. The following are the guidelines to handle friend functions....................
Read answer

What are friend classes? What are advantages of using friend classes?

Latest answer: The friend function is a ‘non member function’ of a class. It can access non public members of the class. A friend function is external to the class definition...............
Read answer

<<Previous  Next>>

Write your comment - Share Knowledge and Experience

Discussion Board
visual besic

Visual besic is the event based programing language developed gui bacd appliction.

sudhir pal 04-4-2013 11:38 PM


Interview questions
Latest MCQs
» General awareness - Banking » ASP.NET » PL/SQL » Mechanical Engineering
» IAS Prelims GS » Java » Programming Language » Electrical Engineering
» English » C++ » Software Engineering » Electronic Engineering
» Quantitative Aptitude » Oracle » English » Finance
Home | About us | Sitemap | Contact us | We are hiring