Solved

Suppose You Have a Programmer-Defined Data Type Data and Want

Question 26

Multiple Choice

Suppose you have a programmer-defined data type Data and want to overload the << operator to output your data type to the screen in the form cout << dataToPrint; and allow cascaded function calls. The first line of the function definition would be:


A) ostream& operator<<(ostream& output, const Data& dataToPrint)
B) ostream operator<<(ostream& output, const Data& dataToPrint)
C) ostream& operator<<(const Data& dataToPrint, ostream& output)
D) ostream operator<<(const Data& dataToPrint, ostream& output)

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions