Skip to main content

Practice · 3 of 3

textstats: Word Count

CHALLENGE
Difficulty: beginner+25 XP

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.

Back to lesson: Practice: Library Building