The C standard I/O library functions are implemented using the Linux I/O functions.
So each of the 3 default open files have both an associated FILE pointer and a file descriptor.
File | FILE * | file descriptor |
---|---|---|
standard input | stdin | 0 |
standard output | stdout | 1 |
standard error | stderr | 2 |
That is, stdin, stdout, and stderr are defined values in the header files and are each of type FILE *.
When a program runs, these are associated with the specified files (or devices).