#include <stdio.h> FILE *tmpfile( void );
The function tempfile() opens a temporary file with an unique filename and returns a pointer to that file. If there is an error, null is returned.