EOF 在C语言中表示文件结束符(end of file)。 #define EOF (-1) 问题1:为什么ch要被声明为int型,而不用char型来读取字符? int ch; ... while(( ch=getchar() ) != EOF