void preorder(NODE *Node)
{
printf("%c ", Node->data);
preorder(Node->leftchild);
preorder(Node->rightchild);
}
In the above program fragment even though the statement 'preorder(Node->leftchild)'
occurs before the statement 'preorder(Node->rightchild)' the actual execution of the program shows that after printing the head node with the help of 'printf()', program control goes to 'preorder(Node->rightchild)'.
It seems that the issue here is related to SYSTEM STACK, but I am unable to say anything about it. Please try to explain in detail how such thing involving seemingly non-sequential execution comes into effect.
Also let me know about similar things occuring in postorder traversal of a binary tree.
Thanking you,
Yours
silbhumi@rediffmail.com