Ask Question
19 December, 17:37

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)

+2
Answers (1)
  1. 19 December, 17:55
    0
    (a) ostream &operator<< (ostream &output, const Data &dataToPrint)

    Explanation:

    If 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 <
    The first line of the function definition would be;

    ostream &operator<< (ostream &output, const Data &dataToPrint)
Know the Answer?
Not Sure About the Answer?
Find an answer to your question ✅ “Suppose you have a programmer-defined data type Data and want to overload the ...” in 📘 Computers and Technology if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers