title: How to fix a condition error from a string array
body: <p>So I declared an array of strings as <code>
  typedef char String[11];</code> and in my main function I have this condition
   `  </p>
  
  <pre><code>char word[12];
  String hashArray[SIZE];
  
  if (insertword(word, hashArray) == 1)
    printf("word %s successfully inserted.\n", word); 
  </code></pre>
  
  <p>This is the function that it calls. </p>
  
  <pre><code>int insertword(char word[], String hashArray[]) 
  {
  
     //get the hash 
     int hashIndex = hashfunction1(word)% 7 ; 
     printf("INDEX:%d\n", hashIndex); //delete later
  
     if (hashArray[hashIndex] == NULL) //ERROR IS HERE
     {
          strcpy(hashArray[hashIndex], word);
          printf("INSERTED!!  ");
          return 1;
     }
     else 
     {
          printf("NOT INSERTED!!  ");
          return 0;
     }
  }
  </code></pre>
  
  <p>I have tested my program by adding a print and apparently the error happens at the first conditional statement. The else part is always what gets executed. I'm definitely missing something here, any help would be appreciated. </p>