#include #include #include "word.h" #include "tree.h" #define MAXWORD 100 #define NDISTINCTTREE 1000 struct tnode *tlist[NDISTINCTTREE]; int main(void) { char word[MAXWORD]; struct tnode *root; int nt; root = NULL; while (getword(word, MAXWORD) != EOF) if (isalpha(word[0])) root = addtree(root, word); nt = tlstore(root, tlist, NDISTINCTTREE); tlsort(tlist, nt); printtl(tlist, nt); tfree(root); return 0; }