#include <stdio.h>
#include <stdlib.h>
main()
{
long nc;
nc=0;
for (nc=0; getchar()!=EOF; ++nc);
printf("%ld\n",nc);
system("Pause");
return 0;
}
No matter what loop option I try I have the same result. The loop does not
terminate when, after entering text, I press the enter key. The command
window hangs. The loop will not terminate to proceed to the rest of the
code.
|