Skip to main content

Practice ยท 3 of 3

textstats: Word Count

Implement public int count_words(const char *s) where words are maximal runs of non-space characters (space = ' ', '\t', '\n'), with a static helper for the space test.

Difficulty: beginner

Back to lesson: Practice: Library Building