Examveda

What is the purpose of the 'friend' keyword in a C++ function declaration?

A. It specifies that the function should be inlined

B. It allows the function to call itself recursively

C. It grants access to private and protected members of a class to the function

D. It declares the function as a friend function

Answer: Option C


Join The Discussion

Related Questions on Functions and Procedures in C plus plus