Format
#include <stdio.h> int _rmtmp(void);
Language Level: Extension
_rmtmp closes and removes all temporary files
opened from the run-time environment from where the call to
_rmtmp has been made.
Return Value
_rmtmp returns the number of temporary
files deleted.
Example
This example uses _rmtmp to remove a
temporary file.
#include <stdio.h>
int main(void)
{
int num;
FILE *stream;
if (NULL == (stream = tmpfile()))
printf("Could not open new temporary file\n");
else {
num = _rmtmp();
printf("Number of temporary files removed = %d\n", num);
}
return 0;
/***********************************************************
The output should be:
Number of temporary files removed = 1 ***********************************************************/ }
![]()
_flushall -- Write Buffers
to Files
remove -- Delete
File
tmpfile --
Create Temporary File
tmpnam --
Produce Temporary File Name
unlink -- Delete
File
<stdio.h>