title: Print contents of a file in reverse line order
body: <p>So i've been running into issues trying to get my program to print output correctly. I have a text file with some content in it, and want to print it from the bottom up.</p>
  
  <pre><code>    fptr = fopen("file.txt", "r");
  
      fseek(fptr, 0, SEEK_END);
      count = ftell(fptr);
  
      while (i &lt; count)
      {
              i++;
              fseek(fptr, -i, SEEK_END);
              printf("%c", fgetc(fptr));
      }
  
      printf("\n");
      fclose(fptr);
  </code></pre>
  
  <p>A sample output from this would be</p>
  
  <p><strong>Input:</strong></p>
  
  
  
  <pre class="lang-none prettyprint-override"><code>Hello
  My name is
  </code></pre>
  
  <p><strong>Output:</strong></p>
  
  <pre class="lang-none prettyprint-override"><code>si eman yM
  olleH
  </code></pre>
  
  <p>What I want the output to be:</p>
  
  <pre class="lang-none prettyprint-override"><code>My name is
  Hello
  </code></pre>