What are friend functions in C++?



What are friend functions in C++?..

Answer / Mohammad Wasim

A friend function is a non-member function that has access to the private and protected members of a class. Friend functions are declared within the class definition using the keyword 'friend'. They are not member functions, but they can be called as if they were member functions.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C++ General Interview Questions

What is :: operator in c++?

1 Answers  


What is buffer and example?

1 Answers  


Does defining a function inline mean that it wont push and pop things on/off the stack ...like parameters and the return the address??

2 Answers  


What is the handle class?

1 Answers  


Differentiate between the message and method in c++?

1 Answers  


What is multithreading and what is its use?Whats are multithreading techniques used in C++?

1 Answers  


Is c# written in c++?

1 Answers  


Which field is used in c++?

1 Answers  


How to defines the function in c++?

1 Answers  


Is there any function that can skip certain number of characters present in the input stream?

1 Answers  


Difference between overloading vs. Overriding

1 Answers  


Why ctype h is used in c++?

1 Answers  


Categories