Next: Basic I/O Up: Predefined Streams Previous: Predefined Streams

Redirection

This how we override the UNIX default predefined I/O defaults.

This is not part of C but operating system dependent. We will do redirection from the command line.

> - redirect stdout to a file.

So if we have a program, out, that usually prints to the screen then

out > file1

will send the output to a file, file1.

<