c program to delete a file || c program code



 c program deletes a file which is entered by the user

#include<stdio.h>
#include<conio.h>
  main() { int status; char file_name[25];   printf("Enter the name of file you wish to delete\n"); gets(file_name);   status = remove(file_name);   if( status == 0 ) printf("%s file deleted successfully.\n",file_name); else { printf("Unable to delete the file\n"); perror("Error"); }   return 0; }
Share this Post Share to Facebook Share to Twitter Email This Pin This Share on Google Plus Share on Tumblr join on whatsapp

    Blogger Comment
    Facebook Comment

0 comments:

Post a Comment