जॉइन Examsbook
1461 0

प्र: What do you mean by friend function in C++ ?

  • उत्तर देखें
  • Workspace

उत्तर :
व्याख्या :

Friends can be either functions or other classes. The class grants friends unlimited access privileges. * The declaration of the function should be preceded by the keyword 'friend'.* The function definition will not use the keyword or the scope operator '::'. Thus, a friend function is an ordinary function or a member of another class.

क्या आपको यकीन है

  त्रुटि की रिपोर्ट करें

कृपया संदेश दर्ज करें
त्रुटि रिपोर्ट सफलतापूर्वक जमा हुई