Your question could be interpreted several ways. Do you want to just print the value of the pointers?
Code:
printf("%p -- %p\n", (void *)root->left, (void *)root->right);
Or do you want to print the contents of each node?
Code:
if (node->left != NULL)
visit(root->left);
if (node->right != NULL)
visit(root->right);
Or do you really want an inorder traversal?
Code:
void traverse(node *root, void (*action)(node *p))
{
if (root == NULL)
return;
traverse(root->left, action);
action(root);
traverse(root->right, action);
}
It's best to be as detailed as possible when asking a question. That way you can get an answer as quickly as possible.