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
- strlwr() function in C
- putchar() function in C
- strnset() function in C
- time() function in C
- fegetexceptflag() function in C/C++
- wctrans() function in C/C++
- wmemcpy() function in C/C++
- fegetenv() function in C/C++
- clock() function in C/C++
- toupper() function in C
- tolower() function in C
- Inline function in C
- feupdateenv() function in C++
- exp2() function in C++ STL