#include <stdio.h> FILE *freopen(const char *filename, const char *mode, FILE *file);
This function closes file if it was open, then opens a new
file like fopen(filename, mode)
but it reuses file.
This is useful to, for example, associate stdout
with a new file.
The new file, or NULL
on error.
ANSI, POSIX
freopen("/tmp/stdout.dat", "wb", stdout);
Go to the first, previous, next, last section, table of contents.