title: Having troubles with reading strings from a file into an array, to ultimately sort
body: <p>I have a project that I'm finishing up where I have to read in strings from a text file and do a quick sort on them. I feel like I have my quick sort function down, but seem to be having problems with my code not going past reading the strings and storing them in the array in my while loop. I put a simple print statement to see if it was reading them and it seems to be doing so as it prints all of the strings out. However, after outputting the strings, it exits on a segmentation fault and won't continue to sort the strings out. I was looking for some advice on what I may be missing or not doing correctly. I'll just post the code where I'm reading the file to store the strings in my array since that's where the error begins.</p>
  
  <p>There are 64 strings total in the file, but I'll post a few and not all.</p>
  
  <pre><code>Strings from text file
  
  lorem
  ipsum
  dolor
  sit
  amet
  consectetur
  adipiscing
  elit
  etiam
  et
  magna
  ut
  sem
  gravida
  efficitur
  pellentesque
  magna
  elit
  posuere
  sit
  amet
  </code></pre>
  
  <p>Actual code</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;string.h&gt;
  #define WORDSNUM 128
  
  void print_list(char * array2[], int size2);
  void swapping_words(char * my_array[], int a, int b);
  void quicksort_list(char * word[], int begin, int end);
  int partition(char * array5[], int e, int f);
  
  int main() {
  
      FILE * fp;  
      fp = fopen("Project08Data.txt", "r");
  
      char * text_words[WORDSNUM];
  
      if (fp == NULL) {
          printf("Error, no file provided or not read properly.\n");
      }
  
      while(fgets(text_words, WORDSNUM, fp) != NULL) {
      printf("%s\n", text_words); //print statement I was using to see if the strings were being read in at least
      }
  
      fclose(fp);
      //These are the functions for my quick sort and printing the list after
      quicksort_list(text_words, 0, WORDSNUM - 1);
      print_list(text_words, WORDSNUM);
  }
  
  </code></pre>