title: Compraring Char array without using strcmp in C
body: <p>Im looking for a way to compare 2 char arrays without strcmp. 
  Is this the way to go? Or am I missing something? WHen I compiled it, if I type in the same strings in both, the program gets stuck and wont do anything. PLEASE HELP!</p>
  
  <p>EDIT: SORRY IT WAS MEANT TO BE A i not a C</p>
  
  <pre><code>int compare_info(char *array1, char *array2)
  {
  
  int i;
  i = 0;
  
  while(array1[i] == array2[i])
  {
      if(array1[i] == '\0' || array2[i] == '\0')
          break;
      i++;
  }
  
  if(array1[i] == '\0' &amp;&amp; array2[i] == '\0')
  return 0;
  
  else
      return-1;
  
  }
  </code></pre>