#include <stdio.h>
FILE *tmpfile ( )
The tmpfile subroutine creates a temporary file and opens a corresponding stream. The file is opened for update. The temporary file is automatically deleted when all references (links) to the file have been closed.
The stream refers to a file which has been unlinked. If the process ends in the period between file creation and unlinking, a permanent file may remain.
The tmpfile subroutine returns a pointer to the stream of the file that is created if the call is successful. Otherwise, it returns a null pointer and sets the errno global variable to indicate the error.
The tmpfile subroutine
fails if one of the following occurs:
This subroutine is part of Base Operating System (BOS) Runtime.
The fopen, freopen, fdopen subroutines, mktemp subroutine, tmpnam or tempnam (tmpnam or tempnam Subroutine) subroutine, unlink (unlink Subroutine) subroutine.
Files, Directories, and File Systems for Programmers in AIX 5L Version 5.1 General Programming Concepts: Writing and Debugging Programs.