Which keyword is used to make a nonmember function as friend function of a class?

Nguyễn Pháp

New member
Which keyword is used to make a nonmember function as friend function of a class?
A. friendly
B. new
C. friend
D. connect
 
Answer: c
Explanation: The keyword friend is provided in programming languages to use it whenever a functions is to be made friend of one class or other. The keyword indicates that the function is capable of new functionalities like accessing private members.
 

Tìm kiếm

Back
Top