This program copies a file from standard input to standard output. Each word from the original file appears on a separate line in the output file. A count of the number of words processed is printed at the end.
This program reads a text file and lists the words occurring in it, together with their frequency of use. It illustrates breaking a program up over multiple files - in this case two .c files and a .h file.
wordtable.h
Routines for maintaining an alphabetized table of words with
frequency counts.
wordtable.c
Implementation of routines declared in wordtable.h.
wordfreq.c
This program reads a text file from standard input, and constructs a
table containing all the words occurring in it, together with the
number of times each word occurs. It then prints out the words and
frequencies in alphabetical order.
Makefile
This file indicates the file dependencies to the make program
and is used to compile and link the program from the component parts.