Master da Web
Back to Blog

Deleting Files in C

LucasApril 2, 20121 min readUpdated on November 4, 2023
Deleting Files in C

In this short post, I’ll show you how to delete a file using the C language.

To delete a file we use the delete(“file_name”) function. In the example below, the program will delete the file masterdaweb.txt:


#include 

int main()
{
delete("masterdaweb.txt");
return 0;
 } 

Share

Need Hosting or Servers?

Discover our VPS, dedicated servers and professional hosting solutions

Related Articles

View all articles