Open a temporary file: how to use tmpfile
#include <stdio.h> int main () { FILE *file; file = tmpfile(); // file is pointing to a temp file. fclose (file); return 0; }