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:

Verified
Correct Answer:
Verified
Q21: The correct function name for overloading the
Q22: The prototypes of overloaded cast operator functions
Q23: Which situation would require the operator to
Q24: The array subscript operator [], when overloaded,
Q25: Suppose the unary ! operator is an
Q27: Which statement about operator overloading is false?<br>A)
Q28: The delete [] operator:<br>A) Can terminate the
Q29: Which of the following is false?<br>A) An
Q30: Which statement about operator overloading is false?<br>A)
Q31: To implicitly overload the += operator:<br>A) Only