Vidyalelo
C++ Programming · Q36

Functions and Procedures in C++

Programming · C++ Programming · question 36

Q36

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
Answer
D.
It declares the function as a friend function

Answer: Option C

Solution

Answer: Option C
No explanation is given for this question Let's Discuss on Board