The following answers are quoted from GPT-3 model, please use them wisely:
#include
#include
int main()
{
FILE *fp;
fp = fopen("111.txt", "r"); //以只读方式打开文件
if (fp == NULL)
{
printf("flaut!");
exit(0);
}
char c;
while ((c = fgetc(fp)) != EOF) //从文件中一次读取一个字符,直到遇到文件末尾
{
if (c != '@') //不是输入结束符
printf("%c", c);
else
break;
}
fclose(fp);
return 0;
}
Please accept my answer if it answers your question