Write a program which counts the number of five letter
words in its input (define a word as anything between
blanks, tabs or newlines). Compile and run it, then type "ready".
Note that all that is wanted is the total number of
five letter words - nothing was said about distinct
words. Just count the number of times exactly five
characters appear between spaces.
This is a passage of text which contains
exactly twelve words of five letters.
Words may appear at the start or at the final
part of a line. Other words show up in
the middle. Avoid counting seven or eight letters
but every five must be noted.
/* one way to count five letter words */
while ((c=getchar()) != EOF) {
if (c == ' ' || c == '\t' || c == '\n') {