title: How do I read a file in C and store the characters in a variable
body: <p>I am completely new to C and need help with this badly. 
  Im reading a file with fopen(), then obtaining the contents of it using fgetc().  What I  want to know is how I can access the line fgetc() returns so if I can put the 4th - 8th characters into a char array. Below is an example I found online but am having a hard time parsing the data returns, I still don't have a firm understanding of C and don't get how an int can be used to store a line of characters.</p>
  
  <pre><code>    FILE *fr;
  fr = fopen("elapsed.txt", "r");
  int n = fgetc(fr);
      while(n!= EOF){
          printf("%c", n);
          n = fgetc(fr);
      }   printf("\n");
  </code></pre>