Interviewer And Interviewee Guide

C++ Friend Interview Question:

What is the syntax of friend function?
a) friend class1 Class2;
b) friend class;
c) friend class
d) None of the mentioned

Submitted by: Murtaza
a) friend class1 Class2;
Explanation:
In option a, the class2 is the friend of class1 and it can access all the private and protected members of class1.
Submitted by: Murtaza

Read Online C++ Friend Job Interview Questions And Answers
Copyright 2007-2024 by Interview Questions Answers .ORG All Rights Reserved.
https://InterviewQuestionsAnswers.ORG.