title: How can i return tree traversal as an array from a C function
body: <p>I can in-order traverse a tree with the below code. But if want to return the in-order traversal from this function how can i do that? </p>
  
  <pre><code>void inorder(Node* root){
      if(root==NULL){
          return;
      }
      inorder(root-&gt;left);
      printf("%d\n",root-&gt;data);
      inorder(root-&gt;right);
  }
  </code></pre>