77.4k views
4 votes
Whenever they are passed as parameters to a function, the IO classes istream and ostream must be passed using a pass-by-reference parameter passing scheme.

Select one:

a. FALSE

b. TRUE

1 Answer

6 votes

Answer:

b. TRUE

Step-by-step explanation:

Whenever they are passed as parameters to a function, the IO classes istream and ostream must be passed using a pass-by-reference parameter passing scheme.

This is because , assuming a pass by value semantics would require us to copy the value of the istream or ostream object which would be meaningless. In fact these objects don't even have a copy constructor at all. So such objects are always passed by reference.

User Kristian Vitozev
by
8.0k points