!<arch> Itreesearch 418431203 968 27 100644 48 ` mar may nov aug apr jan dec jul feb jun oct sep Otreesearch 418431204 968 27 100644 72 ` mar 1 may 1 nov 1 aug 1 apr 1 jan 1 dec 1 jul 1 feb 1 jun 1 oct 1 sep 1 Ttreesearch.c 418431203 968 27 100644 670 ` /* * treesearch() */ #include <stdio.h> #include "tree.h" #include "null.h" #define KEYSIZE 10 char *PGN = "Ttreesearch"; /* program name */ int level = 0; /* current level in tree */ main() { int treesearch(); /* binary tree search */ TREE *root; /* root of tree */ TREE *tree(); /* binary tree search and insert */ char key[KEYSIZE]; /* input key buffer */ void inorderprint(); /* print a binary tree inorder */ root = NULL; /* tree search and insertion */ while (gets(key) != NULL) { root = tree(root, key); } /* tree search */ rewind(stdin); while (gets(key) != NULL) printf("%s %d\n", key, treesearch(root, key)); exit(0); }