title: comparing 2 arrays with recursion (C language)
body: <p>i have to get scan the size, and 2 arrays, and compare them with recursion return 1 if they are the same, else return 0.</p>
  
  <p>for example if i've got: size=5, arr1= 1 2 3 4 5, arr2= 2 1 3 4 5 so its good and 1 should be returned, when i run the program with the size of 2, and insert "1,2" for first array and "3,4" for second array the program return 0. which is good, but if enter "1,2" "1,2" i'm getting an error.</p>
  
  <pre><code> int RecSearch(int* arr1,int* arr2,int n)
  {
  int i=0,j=0;
  for(i=j;j&lt;n;j++)
      if(arr1[i]==arr2[j])
        {
          swap(&amp;arr2[i],&amp;arr2[j]);
          RecSearch(arr1-1,arr2-1,n);
        }
        if (arr1==arr2) return 1;
        else return 0;
  }
  </code></pre>