Tmpfile

From Wikipedia, the free encyclopedia

The correct title of this article is tmpfile. The initial letter is shown capitalized due to technical restrictions.

tmpfile is a function in the standard library of C programming language that opens a temporary file and returns the pointer to the file. It has the following prototype:

FILE* tmpfile()

The file can be used in normal file manipulation by the program, and should be closed by the fclose function before termination of the program. This function is specified in ANSI C and is included in the header file stdio.h.