Why are the extraction and insertion operators always implemented as friends of the class rather than as members of the class?

a. Because the first parameter must be the stream object.
b. They don't, they could be members
c. Because they return a reference
d. Because the stream is passed by reference.


a. Because the first parameter must be the stream object.

Computer Science & Information Technology

You might also like to view...

Answer the following statements true (T) or false (F)

1. The operating system cannot enforce access-control policies based on user identity. 2. The security of the Kerberos server should not automatically be assumed, but must be guarded carefully by taking precautions such as placing the server in a locked room. 3. Once the server verifies that the user ID in the ticket is the same as the unecrypted user ID in the message it considers the user authenticated and grants the requested service. 4. It is the ticket that proves the client's identity. 5. Identity providers may also assign attributes to users, such as roles, access permissions, and employee information.

Computer Science & Information Technology

Which of the following functions returns the number in the middle of a set of numbers?

A) MEDIAN B) COUNTA C) MEAN D) AVERAGE

Computer Science & Information Technology

A(n) ____________________ is a web app that evaluates your computer or mobile device to check for Internet and email vulnerabilities.

Fill in the blank(s) with the appropriate word(s).

Computer Science & Information Technology

The __iter__ method is identical in the ArrayBag and LinkedBag classes.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology