新人一点问题
程序代码:#include <stdio.h>
/* count characters in input; 1st version */
main()
{
long nc;
nc = 0;
while (getchar() != EOF)
++nc;
printf("\n%ld\n", nc);
fflush(stdin);
getchar();
}这个代码编译运行后仍然一闪而过,fflush函数没有用吗?并且调试查看nc变量一直都是0,代码哪里出问题了呢?希望大神能够帮忙解答一下……










菜鸟