C++ Programming :: Functions - Discussion
7 / 14
A friend function can be called
Aby using object of the class
Bdirectly
Cshould not be called
Dlike a normal function
Show Explanation
To define a friend function, we will declare the function name preceded with keyword inside the class and function definition will be placed outside of the class.
A friend function can be invoked directly by using the function name.
Asked In ::
A friend function is a regular function with its definition placed outside of any class. But a friend function when defined will have access to all private and public members of the class.
To define a friend function, we will declare the function name preceded with keyword inside the class and function definition will be placed outside of the class.
A friend function can be invoked directly by using the function name.
Read Full Answer
Report Error
Please Login First Click Here