I\'ve been reading \"The C Programming Language\" and I got to this part of inputs and outputs.
I\'ve read other threads saying that the console doesn\'t recognize e
Change the line
// Buggy, you want calculate the # of '\n' in loop body,
// so logically you shouldn't use it as a stop condition.
while ((c = getchar()) != '\n')
to
while ((c = getchar()) != EOF)
And try press Ctrl + C in your console window on Windows. It works on my platform which is running Win7.
