# include <stdio.h>
main(int argc,char *argv[])
{
FILE *in,*out;
char ch;
/*,infile[10],outfile[10]*/
/*
printf("enter the infile name:/n");
scanf("%s",infile);
printf("enter the outfile name:/n");
scanf("%s",outfile);*/
if(argc!=3)
{
printf("you forgot to genter a file name/n");
exit(0);
}
/*打开两个文件*/
if((in=fopen(argv[1],"r"))==NULL)
{
printf("cannot open this file/n");
exit(0);
}
out=fopen(argv[2],"w");
/*文件对拷*/
while(!feof(in))
fputc(fgetc(in),out);
fclose(in);
fclose(out);
printf("you have copy successfully");
}