#include<stdio.h>
int main() {
FILE* fp;
fp = fopen("temp.txt", "w");
fprintf(fp, "Hello, World!\n");
return 0;
}
The delete function ( defined in stdio.h ) accepts the file name as a parameter, but not the file pointer itself.
Is there any function in the standard C libraries that does file deletion and takes a file pointer as an argument?
source
share