>>51
よくわからんが treeprint だけ答えればいいのか?

#define MAXSIZE 1000
void treeprint(struct tnode *p)
{
  int top = 0;
  struct tnode *stack[MAXSIZE];
  stack[top++] = p;
  while (top > 0) {
    p = stack[--top];
    if (!p) continue;
    if (p->count > 0) {
      stack[top++] = p->left;
      p->count *= -1;
      stack[top++] = p;
    } else {
      p->count *= -1;
      printf("%4d %s\n", p->count, p->word);
      stack[top++] = p->right;
    }
  }
}