#include <stdio.h>
int main() {
FILE *f,*c;
char f1[50],f2[50],ch;
printf("\n\t\tFile Copying.");
printf("\n\t\t------------");
printf("\nEnter the file name to copy :");
scanf("%s",f1);
if((f=fopen(f1,"r"))==NULL)
{
printf("\n'%s' File is NOT FOUND.",f1);
}
else
{
printf("\nEnter the file name to be copied:");
scanf("%s",f2);
c=fopen(f2,"w");
while(!feof(f))
{
ch=fgetc(f);
fputc(ch,(c));
}
printf("\n\n'%s' File content is copied '%s' File.",f1,f2);
}
return 0;
}
To embed this project on your website, copy the following code and paste it into your website's HTML: