The mkstemp() function generates a unique temporary filename from template, creates and opens the file, and returns an open file descriptor for the file. ###>The mkstemp() function generates a unique temporary filename from template.