[Updated] Goldman Sachs Aptitude Test Questions and Answers
Practice List of TCS Digital Coding Questions !!!
Take 50+ FREE!! Online Data Interpretation Mock test to crack any Exams.

C++ Programming :: Functions - Discussion

Home > C++ Programming > Functions > MCQs Questions Discussion

9 / 14

Choose the correct option.

Friend function should be declared in the _________part of the class.

Apublic

Bprivate

Cboth (a) and (b)

Danywhere.

Answer: Option (Login/Signup)

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.

It can be declared in Private and Public part of the class.

Asked In ::

Post Your Answer Here:     

Reply    
Rate This: +0 -0
    Report


Report Error

Please Login First Click Here