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)

a. ostream& operator<<(ostream& output, const Data& dataToPrint)

Computer Science & Information Technology

You might also like to view...

Which of the following can be pushed down to a computer and can be changed by the user?

A. Group Policy Object B. Group Policy Preference C. Group Policy Setting D. Group Domain object

Computer Science & Information Technology

Given the array declaration below, what is stored in numbers[2] ? ? int numbers[5] = {0};

What will be an ideal response?

Computer Science & Information Technology