Functions HI-TECH C FREOPEN
#include <stdio.h> FILE * freopen(char * name, char * mode, FILE * stream)
Freopen() closes the given stream (if open) then reopens the stream attached to the file described by name. The mode of opening is given by mode. It either returns the stream argument, if successful, or NULL if not. See fopen() for more information.