#include <stdio.h>
#include<stdlib.h>
main ()
{
	int c;
	FILE *fp1,*fp2;
	if((fp1=fopen("c://text.txt","r"))== NULL)
	{
		printf("源文件打开失败");
		exit(0);
	}	
	if((fp2=fopen("c://text2.txt","w"))==NULL)
	{
		printf("目标文件打开失败");
		exit(0);
	}
	while((c=fgetc(fp1))!=EOF)
		fputc(c,fp2);
	fclose(fp1);
	fclose(fp2);
}
