Question: 8.Answer these questions about overloading the stream operators: In a class, why do you include the functions that overload the stream insertion, < >, operators

8.Answer these questions about overloading the stream operators:

In a class, why do you include the functions that overload the stream insertion, <<, and extraction, >>, operators as friend functions?

What is returned by the function that overloads the >> operator for a class?

What is returned by the function that overloads the << operator for a class?

9. What is the purpose of a dummy parameter in a function that overloads the post-increment or post-decrement operator for a class?

10. What type of value should be returned by a function that overloads a relational operator?

11. How many parameters are required to overload:

the pre-increment operator for a class as a member function?

the pre-increment operator for a class as a friend function?

the post-increment operator for a class as a member function?

the post-increment operator for a class as a friend function?

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!