HSC Science (Computer Science) 12th Board ExamMaharashtra State Board
Share
Notifications

View all notifications

Explain Difference Between Operator Function as Member Function and as a Friend Function - HSC Science (Computer Science) 12th Board Exam - Computer Science 1

Login
Create free account


      Forgot password?

Question

Explain difference between Operator Function as Member Function and as a Friend Function

Solution

The basic difference between operator function as a friend function and as member function is that a friend function will have only one argument for unary operators and only one for binary operators. This is because the object used to invoke the member function is passed implicitly and therefore is available for the member function. This is not the case with friend function. Arguments may be passed either by value or by reference.

  Is there an error in this question or solution?

APPEARS IN

 2015-2016 (March) (with solutions)
Question 2.2.1 | 4.00 marks
 2016-2017 (March) (with solutions)
Question 2.2.1 | 4.00 marks
Solution Explain Difference Between Operator Function as Member Function and as a Friend Function Concept: C++ Programming.
S
View in app×