title: Checking if a string exists in an uninitialized array of strings
body: <p>I have a helper function that determines if a string exists within an array of strings:</p>
  
  <pre><code>bool exists_in(char *string, char *array[], int size){
      int i;
      for(i = 0; i &lt; size; ++i){
          if(strcmp(string, array[i]) == 0)
              printf("%s\n", array[i]);
              return true;
      }
      return false;
  }
  </code></pre>
  
  <p>Basically, I want to put an element inside the array if it isn't already in there. How can I do this with an array that isn't initialized to have values in it? </p>
  
  <pre><code>char *myArray[100] // initailize array
  </code></pre>
  
  <p>I want to call exists_in() on myArray, but this will give me a segfault 11 because there are no values in the myArray.</p>