编程序中名为“d:\CCW.TXT"的磁盘文件中“@”字符之前的所有字符解密后显示。
#include #include void main() {FILE*fp; char c,cc; if((fp=fopen(”d:\ccw.Txt”,”r+”))==NULL) {printf("call not open file!\n”);exit(0);} do {c=fgetc(fp); cc=c+10; putchar(cc);/*解密后显示*/ fseek(fp,-1L,1); fputc(cc,fp); fseek(fp,0L,1); }while(c!='@'); fclose(fp); }