# STDIN, STDOUT, STDERR

These three file pointers are automatically defined when a program executes and provide access to the keyboard and screen.

## stdin

By default stdin accesses the keyboard. Functions that read stdin include...

- gets
- getchar

The following functions can access stdin

- fgets
- fgetc
- fscanf

stdin example program.

## stdout

stdout sends data to the screen. Functions that write to stdout include....

- printf
- puts
- putchar

## stderr

stderr also writes to the screen. If you are using a Unix based system the data sent to stdout and stderr can be seperated and sent to different places. Functions that could write to stderr include...

- fprintf
- fputs

Top | Master Index | C Keywords | Functions

If you wish to create file pointers to perform I/O to other devices you should use fopen