c/io/freopen

@1@ First, attempts to close the file associated with, ignoring any errors. Then, if is not null, attempts to open the file specified by  using  as if by fopen, and associates that file with the file stream pointed to by. If is a null pointer, then the function attempts to reopen the file that is already associated with  (it is implementation defined which mode changes are allowed in this case).

@2@ Same as, except that is treated as in fopen_s and that the pointer to the file stream is written to  and the following errors are detected at runtime and call the currently installed constraint handler function:
 * is a null pointer
 * is a null pointer
 * is a null pointer

Return value
@1@ A copy of the value of on success, null pointer on failure. @2@ zero on success (and a copy of the value of is written to, non-zero on error (and null pointer is written to  unless  is itself a null pointer).