Which rule will not affect the friend function?
a) private and protected members of a class cannot be accessed from outside
b) private and protected member can be accessed anywhere
c) both a & b
d) None of the mentioned
Submitted by: Murtazaa) private and protected members of a class cannot be accessed from outside
Explanation:
Friend is used to access private and protected members of a class from outside the same class.
Submitted by: Murtaza
Explanation:
Friend is used to access private and protected members of a class from outside the same class.
Submitted by: Murtaza
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. |