你要保存什么呢?以下是简单的文件备份程序,供参考:/* Program to create backup of a file */#include <stdio.h>int main(void){ FILE *in, *out; if ((in = fopen("TESTFILE.DAT", "rt")) == NULL) { fprintf(stderr, "Cannot open input file.\n"); return 1; } if ((out = fopen("TESTFILE.BAK", "wt")) == NULL) { fprintf(stderr, "Cannot open output file.\n"); return 1; } while (!feof(in)) fputc(fgetc(in), out); fclose(in); fclose(out); return 0;}