According to stdout(3), the stdout
is a pointer (to some FILE
opaque structure), because it is a file stream. It is not a file descriptor. Its file descriptor is
STDOUT_FILENO
which indeed is 1.
On my Gnu libc Linux system, I have near line 169 of /usr/include/stdio.h
:
/* Standard streams. */
extern struct _IO_FILE *stdin; /* Standard input stream. */
extern struct _IO_FILE *stdout; /* Standard output stream. */
extern struct _IO_FILE *stderr; /* Standard error output stream. */
/* C89/C99 say they're macros. Make them happy. */
#define stdin stdin
#define stdout stdout
#define stderr stderr
Before that (line 48) there is
typedef struct _IO_FILE FILE;
See also this answer to a related question.