下列程序的主要功能是从名为“CCW1.TXT”的加密文本文件中读取10个字符,
解密(-4)后送显示器显示。
#include "stdio.h"
#include "stdlib.h"
void main()
{
FILE *fp;
int i;
if ((fp=fopen("ccw1.txt"," r "))==NULL)
{
printf("file can not open!\n");
exit(0);
}
for (i=0;i<10;i++)
____________________ ;
fclose (fp);
}
#include "stdio.h"
#include "stdlib.h"
void main()
{
FILE *fp;
int i;
if ((fp=fopen("ccw1.txt","r"))==NULL)
{
printf("file can not open!\n");
exit(0);
}
for (i=0;i<10;i++)
printf("%c", fgetc(fp)-4);
fclose (fp);
}
您好,我是有问必答小助手,您的问题已经有小伙伴帮您解答,感谢您对有问必答的支持与关注!如有帮助,请点击我的回答下方的【采纳该答案】按钮帮忙采纳下,谢谢!