If the file exists, it is deleted first. The file is created if it does not exist. The file is created if it does not exist. If the files exist, it gets truncated to zero first. Opens file filename with the specified mode and associates with it the specified stream .
Returns stream or NULL on error.
Usually used to change files associated with stdin , stdout , stderr . Effect undefined for input stream . Returns EOF for write error, zero otherwise. Returns EOF on error, zero otherwise. Returns non-zero on failure.