Write the C code to perform in-order traversal on a binary tree.

Category: Data StructureWrite the C code to perform in-order traversal on a binary tree.
1 Answers
Editor">Editor Staff answered 2 years ago

void in-order(struct treenode *tree)
{
if(tree != NULL)
{
in-order(tree→ left);
printf(“%d”,tree→ root);
in-order(tree→ right);
}
}