Home »
MCQs »
OOPs MCQs
State the correct syntax of a friend function
89. State the correct syntax of a friend function.
Class ABC{
*****
Friend public:
*****
Void xyz(); }
Class ABC{
*****
public:
*****
Friend Void xyz(); }
Class ABC{
*****
Friend public:
*****
Friend Void xyz(); }
Class ABC{
*****
public::friend()
*****
Friend Void xyz(); }
Answer: B)
Class ABC{
*****
public:
*****
Friend Void xyz(); }
Explanation:
The correct syntax of a friend function:
Class ABC{
*****
public:
*****
Friend Void xyz(); }