title: Error when trying to read in numbers from txt file in C
body: <p>I am new to C programming and I am getting a THREAD 1: EXC_BAD_ACCESS(code = 1, address 0x68)
  when I run my program. The purpose of my code is to read from a txt file that contains positive and negative numbers and do something with it.</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  
  int main (int argc, const char * argv[]) {
  
      FILE *file = fopen("data.txt", "r");
      int array[100];
  
      int i = 0;
      int num;
  
      while( fscanf(file, "%d" , &amp;num) == 1) { // I RECEIVE THE ERROR HERE
          array[i] = num;
          printf("%d", array[i]);
          i++;
      }
      fclose(file);
  
      for(int j = 0; j &lt; sizeof(array); j++){
          printf("%d", array[j]);
      }
  }
  </code></pre>