K&R Exercises

Exercise 1-11: Word count

Write the word count program: count the lines, words, and characters in the input. A word is any sequence of characters that does not contain a blank, tab or newline.

Print the three counts on one line, separated by spaces: lines, then words, then characters.

Test Cases

· space→ tab↵ newline

Submissions

No submissions yet