Electrical and Computer Engineering
20 of 37
UAH
CPE 112
The Reading Marker
and the Newline Character
•The reading marker indicates the next character waiting to be read.
•Each input line has an invisible end-of-line character (the newline character) that tells where one line ends and the next begins.
•A newline character is inserted when you hit an enter or Return or when a program outputs an endl. It’s referred to as \n.
•Examples:
– ch = ‘\n’; or
– cout << “Hello\n”;
–               (same as cout << “Hello” << endl;)