Where does keyword 'friend' should be placed?
a) function declaration
b) function definition
c) main function
d) None of the mentioned
Submitted by: Administratora) function declaration
Explanation:
The keyword friend is placed only in the function declaration of the friend function and not in the function definition because it is used toaccess the member of a class.
Submitted by:
Explanation:
The keyword friend is placed only in the function declaration of the friend function and not in the function definition because it is used toaccess the member of a class.
Submitted by:
Read Online C++ Friend Job Interview Questions And Answers
Top C++ Friend Questions
☺ | List the characteristics of friend functions? |
☺ | Explain the characteristics of friend functions? |
☺ | What is a friend function? |
☺ | What are friend classes? |
☺ | Explain advantages of using friend classes? |
Top C Plus Plus Language Categories
☺ | C++ Pointers & Functions Interview Questions. |
☺ | C++ Operator Overloading Interview Questions. |
☺ | C++ Exception Handling Interview Questions. |
☺ | C++ Virtual Functions Interview Questions. |
☺ | C++ Template Interview Questions. |