Table of contents
Input and Output (I/O
) is one of the basic functions of a computing device.
If we consider the result of all programming to be telling hardware what to do:
Under the hood of the computing device, input is received and processed then output is generated.
In programming, I/O operations guide how data is manipulated to produce relevant outcomes.
I/O Rules
I/O operations are straightforward:
Input comes from the standard input device, i.e:
stdin
.Output is generated by the standard output device, i.e:
stdout
.
I/O Devices
Conventionally, stdin
is the keyboard but the input can also be redirected by the OS to make it come from a device like a WiFi router/modem or from a file, while stdout
is the display, but the output can be redirected so that it goes to another device, such as a printer or into a file.