I\'m currently working through the excercises in \'The C Programming Language\'. Here\'s one of my solutions:
int c; while ((c=getchar()) != EOF) { if (c == \
Well if you really don't like the empty braces, you could refactor that inner loop into
while (c == ' ') {c = getchar();}
This costs one extra comparison though, so a do while loop would be better.