Solved

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

Question 14

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

Unlock this Answer For Free Now!

View this answer and more for free by performing one of the following actions

qr-code

Scan the QR code to install the App and get 2 free unlocks

upload documents

Unlock quizzes for free by uploading documents