#include <stdio.h>

int main () 
{
   int ret;
   
   ret = rename("oldname.txt", "newname.txt");
	
   if(ret == 0) 
   {
      printf("File renamed successfully");
   }
   else 
   {
      printf("Error: unable to rename the file");
   }
   
   return(0);
}

21,559 Comments

Leave a Reply

Avatar placeholder