C++ Programming - OOPS Concepts - Discussion
Discussion Forum : OOPS Concepts - General Questions (Q.No. 9)
9.
Which of the following cannot be friend?
Discussion:
21 comments Page 1 of 3.
Kiran said:
1 decade ago
Class and functions can only be friend. Objects are instance of class, they cannot be defined by user as friend.
Surya joy said:
1 decade ago
Objects cannot be defined as friend by a user since it is just instance of a class.
Supreet kaur said:
1 decade ago
Friend function is a function which is not the member of the class but take part in class to pass arguments. Similarly a class can be a friend but an object cannot because it is an instance of the class.
Jyoti shankar chaubey said:
1 decade ago
How you can say that operator function is a friend function?
Saba said:
1 decade ago
How can operator function be a FRIEND FUNCTION?
Sanket said:
1 decade ago
How can operator function be friend function?even I didn't get it?
K.soundarya rao said:
1 decade ago
Any type of function can be made friendly exception-static. But object are the instance of class that cannot be made friend.
Amolbendale said:
1 decade ago
How you can say that operator function is a friend function?
Kamal said:
1 decade ago
What is operator function?
Nirmala said:
1 decade ago
I don't know whether it is correct. The operator functions are used in the concept of operator overloading and type conversion. Operator can be overloaded as a member function or friend function. Therefore an operator function can be a friend function.
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers