August 27th, 2013, 11:58 PM
Can any one explain how this works?
/* This is a prog for tree inorder traversal and I don't know how this gives me the perfect o/p. Here we are calling inorder again and printf also works. */
void inorder(struct tree *root)
if(root != NULL)
August 28th, 2013, 12:10 AM
Well you could try it on a couple of simple trees, then step through the code with a debugger, watching the recursive calls as they happen.
Here's the first simple tree
Here's the second simple tree