int remove ( const char * filename );
1234567891011
/* remove example: remove myfile.txt */ #include <stdio.h> int main () { if( remove( "myfile.txt" ) != 0 ) perror( "Error deleting file" ); else puts( "File successfully deleted" ); return 0; }
File successfully deleted
Error deleting file: No such file or directory