CPP 4
CPP 4
SESSION 4
Input/Output
Input/Output (I/O) is how programs
Important objects:
cout → Standard Output Stream
output stream).
Can chain multiple outputs:
cout << "Name: " << name << ", Age: " <<
age;
Data is sent to the console in sequence.
Escape Sequences
Escape sequences start with \ and allow special
formatting:
Sequence Description
\n New Line
\t Horizontal Tab
\\ Backslash
defined in conio.h.
getch() not echo the character.
define in conio.h.
getche() echo the character.