In C Programming Language, the tmpfile() function is used to produce/create a temporary file.
- tmpfile() function is defined in the “stdio.h” header file.
- The created temporary file will automatically be deleted after the termination of program.
- It opens file in binary update mode i.e., wb+ mode.
- The syntax of tmpfile() function is:
- The tmpfile() function always returns a pointer after the creation of file to the temporary file. If by chance temporary file can not be created, then the tmpfile() function returns NULL pointer.
Temporary file is created Hello GeeksforGeeks
This article is contributed by Bishal Kumar Dubey. If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please write comments if you find anything incorrect, or you want to share more information about the topic discussed above.
- arc function in C
- toupper() function in C
- clock() function in C/C++
- strlwr() function in C
- tolower() function in C
- putchar() function in C
- Inline function in C
- towupper() function in C/C++
- iswblank() function in C/C++
- iswpunct() function in C/C++
- raise() function in C++
- feupdateenv() function in C++
- exp2() function in C++ STL
- fread() function in C++
- strcspn() function in C/C++