title: Scanning array with sequencial index after double recursive function
body: <p>I'am trying to have a normal increment index after a double recursive function call. The problem is my index isn't incremented with one every call, and I cannot compare my array with BST tree to check if my input was preord or not. It works just with one recursive call. This my code:</p>
  
  <pre><code>int checkPreord(struct BST *root,int *v, int index)
  {
  
    if(!root)
    {   
     return 1;
    }
  
    if(v[index]!=root-&gt;data){
      printf("%d %d\n",v[index],root-&gt;data);
     return 0;    
    }
  
    checkPreord(root-&gt;left,v,index+1);
  
    checkPreord(root-&gt;right,v,index+1);
  }
  </code></pre>