HELP me in understanding RECURSION plsss

Hey guys I am lost in recursion..how it escapes calling itself here:

1
2
3
4
5
6
7
void Inorder(Node *root) {
	if(root == NULL) return;
 
	Inorder(root->left);       //Visit left subtree
	printf("%d ",root->data);  //Print data
	Inorder(root->right);      // Visit right subtree
}

every time function inorder (root->left) is called then how come it goes to printf statement and next call? Isnt it like a loop the moment first function call is made inside inorder(root)?

The base case is on line 2.
Topic archived. No new replies allowed.