c/io/tmpfile

@1@ Creates and opens a temporary file. The file is opened as binary file for update (as if by fopen with mode). The filename of the file is guaranteed to be unique within the filesystem. At least tmp_max files may be opened during the lifetime of a program (this limit may be shared with tmpnam and may be further limited by fopen_max).

@2@ Same as, except that at least tmp_max_s files may be opened (the limit may be shared with tmpnam_s), and if is a null pointer, the currently installed constraint handler function is called.

The temporary file created by this function is closed and deleted when the program exits normally. Whether it's deleted on abnormal termination is implementation-defined.

Parameters
@1@ (none) @2@ pointer to a pointer that will be updated by this function call

Return value
@1@ Pointer to the file stream associated with the file or null pointer if an error has occurred. @2@ Zero if the file was created and open successfully, non-zero if the file was not created or open or if was a null pointer. In addition, pointer to the associated file stream is stored in on success, and a null pointer value is stored in  on error.