How do I close a file and remove it?
I have the following code:
FILE *filePtr = fopen(\"fileName\", \"w\"); ...
Now I want to close
You do not need to fopen a file to remove it. But, in linux, if you remove an fopened file, it will be deleted only after closing it. You can still read/write to it.
fopen
remove