#include<stdio.h>
#include<conio.h>
#include<process.h>

void main()
{
FILE *fs,*ft;
char c,fn1[12],fn2[12];
clrscr();
fflush(stdin);
printf("enter the file name of the first file..\t");
scanf("%s",fn1);
printf("enter the file name of the second file..\t");
scanf("%s",fn2);
fs=fopen(fn1,"r");
if(fs==NULL) {printf("error....has occured");exit(0);}
ft=fopen(fn2,"w");
if(fn2 !=NULL) printf(" overwrite??");
while(1)
{
c=getc(fs);
if(c==EOF) break;
else putc(c,ft);
}
fclose(fs);
fclose(ft);
}

