HP C/iX Library Reference Manual (30026-90004)

Chapter 5 367
HP C/iX Library Function Descriptions
tmpfile
tmpfile
Creates a temporary file.
Syntax
#include <stdio.h>
FILE *tmpfile (void);
Parameters
None.
Return Values
x
A pointer to a stream associated with the temporary file.
NULL The file cannot be opened.
Description
The tmpfile function creates a temporary file using a name generated by tmpnam() and
returns a pointer to the resulting stream. The file is automatically deleted when the
process using it terminates.
If linking with the HP C/iX libraries, the file is opened for update as a binary stream using
wb+ mode.
If linking with the POSIX/iX library, the file is opened for update as a byte stream using
the ws+ mode.
See Also
tmpnam(), ANSI C 4.9.4.3, POSIX.1 8.1