#include<stdio.h>
void main()
{
FILE *f,*c;
char f1[50],f2[50],ch;
printf("\n\tFILE COPYING");
printf("\nEnter the file name to copy    :");
scanf("%s",f1);
if((f=fopen(f1,"r"))==NULL)
{
printf("\nERROR:The file, '%s' 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\nThe file content of '%s' is copied '%s'.",f1,f2);
}
}






Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: