title: How to compare two arrays and see if they are identical?
body: <p>I am trying to compare 2 arrays element by element and see if they are identical. I can get it to work for all situations except for when the len=0. I can't seem to get it to say that two arrays a={} and b={} are identical.</p>
  
  <p>This is what I have so far</p>
  
  <pre><code>int identical( int a[], int b[], unsigned int len )
  {
    int same=0;
    for( unsigned int i=0; i&lt;len; i++ )
    {
       if(len==0)
              {
                same=1;
              }
  
       if (a[i]==b[i])
              {
                same=1;
              } 
  
               else{
                    same=0;}
     }
  return same;
  }
  </code></pre>