关于重定向的一个程序,不知道怎么运行的,有没有大佬讲解一下该程序怎么输出

#include <stdio.h> int main(void) { int i; for(i=0; getchar() != EOF; i++); printf("There are %d char",i); return 0; }
我输入了几个字符,最后输入EOF,没有输出,不知道是程序的问题,还是我的问题
[此贴子已经被作者于2017-2-10 16:06编辑过]
#include <stdio.h> int main(void) { int i; for(i=0; getchar() != EOF; i++); printf("There are %d char",i); return 0; }
[此贴子已经被作者于2017-2-10 16:06编辑过]