按ctrl+z直接识别文件尾信号,那么EOF不就没意义了吗?要过要按键按下EOF结束,该怎么输入?
#include<stdio.h>int main ()
{
int ch;
while((ch = getchar()) != EOF)
putchar(ch);
return 0;
}
#include<stdio.h>
int main ()
{
int ch;
while((ch = getchar()) != EOF)
putchar(ch);
return 0;
}