title: Issues with reading from text file
body: <p>I have been trying to read a text file in C and I have ran into issues. I had looked at a few tutorials and I found one that seems to work, however the outputted text contains lots of data that I don't need.</p>
  
  <p>Here is my code:</p>
  
  <pre><code>int c;
  FILE *file;
  file = fopen(inputFilename, "r");
  if (file) {
      while ((c = getc(file)) != EOF) {
          putchar(c);
      }
      fclose(file);
  }
  </code></pre>
  
  <p>And here is an output:</p>
  
  <pre><code>The contents of testfile.txt file are:
  {\rtf1\ansi\ansicpg1252\cocoartf1344\cocoasubrtf720
  {\fonttbl\f0\fswiss\fcharset0 Helvetica;}
  {\colortbl;\red255\green255\blue255;}
  \paperw11900\paperh16840\margl1440\margr1440\vieww10800\viewh8400\viewkind0
  \pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural
  
  \f0\fs24 \cf0 this is a test}
  </code></pre>
  
  <p>Obviously I'm just looking to output the 'this is a test' part.</p>
  
  <p>Any ideas?</p>