1#include <stdio.h>
2#include <stdlib.h>
3#include "bin-trees.h"
4
5static void
6real_preorder (tree_ptr root)
7{
8  if (root == NULL)
9    return;
10
11  printf ("%d ", root->data);
12  real_preorder (root->left);
13  real_preorder (root->right);
14}
15
16
17void
18pre_order_traverse (tree_ptr root)
19{
20  printf ("pre-order traversal, with recursion: \n");
21  real_preorder (root) ;
22  printf ("\n");
23}
24