MCQsIntermediate MCQsFriend FunctionsFriend Functions 1).What is a friend function in C++?1) A function that can access private and protected members of a class2) A function declared inside another function3) A function used for operator overloading4) None of the above 2).How is a friend function declared?1) Using the friend keyword2) Using the public keyword3) Using the virtual keyword4) None of the above 3).Can a friend function be a member of a class?1) No2) Yes3) Only in derived classes4) None of the above 4).Which of the following can be a friend function?1) A non-member function2) A member function of another class3) Both A and B4) None of the above 5).What is the purpose of a friend function?1) To provide controlled access to private data2) To inherit properties from a base class3) To override virtual functions4) None of the above 6).Can friend functions be inherited?1) No2) Yes3) Only in certain cases4) None of the above 7).What is the scope of a friend function?1) It is not limited to the class2) It is limited to the class3) It has global scope4) None of the above 8).Can a friend function access the members of multiple classes?1) Yes2) No3) Only if those classes are related4) None of the above 9).Which of the following is true about friend functions?1) They violate encapsulation2) They increase security3) They require virtual inheritance4) None of the above 10).Can a friend function be overloaded?1) Yes2) No3) Only with operator functions4) None of the above