Code:
#include #define NEWLINE \'\\n\' #define SPACE \' \' int main(void) { int ch; int count = 0; while((ch = getchar()
^Z is only translated by the console to an EOF signal to the program when it is typed at the start of a line. That's just the way that the Windows console works. There is no "workaround" to this behaviour that I know of.
^Z