UNIX defines 3 predefined streams (in stdio.h):
stdin, ~stdout, ~stderr
They all use text a the method of I/O.
stdin and stdout can be used with files, programs, I/O devices such as keyboard, console, etc.. stderr always goes to the console or screen.
The console is the default for stdout and stderr. The keyboard is the default for stdin.
Predefined stream are automatically open.