Ctrl-D signals the end of file/transmission thus
is sufficient.Code:while ((c = getchar()) != EOF)
I removed c !=4 and it no longer responded to CNTRLD, I am using windows...
Got it working! for real this time
set \t and '' to state OUT
set \n to increment and state out
default if char increment and fixed the word count as another if statement proceeding that.
Thanks for everyone's help. In three months from now, when I am an expert programmer I will remember you all.