【例12-3】复制用户信息文件。将例12-2的用户信息文件user.txt文件备份一份,取名为文件f12-3.txt。说明:将文件user.txt与源程序放在同一目录下,执行程序。#includestdio.h #includestdlib.h int main(){ FILE *fp1fopen(user.txt,r); if(fp1NULL){ printf(File(user.txt) can not open!\n); exit(0); } FILE *fp2fopen(f12-3.txt,w); if(fp2NULL){ printf(File(f12-3.txt) can not open!\n); exit(0); } int ch; while(!feof(fp1)){ chfgetc(fp1); if(ch!EOF){ fputc((char)ch,fp2); } } if(fclose(fp1)){ printf(Can not close the file(user.txt)!\n); exit(0); } if(fclose(fp2)){ printf(Can not close the file(f12-3.txt)!\n); exit(0); } return 0; }