title: Program hangs on printf or skips printf
body: <p>My program is to get the file size every so often and display it to record any changes. For some reason executing the code below hangs and just provides me with a cursor. Nothing is printed or displayed.</p>
  
  <p>code:</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;stdlib.h&gt;
  #include &lt;unistd.h&gt;
  
  int main(int argc, char *argv[])
  {
    if (argc != 3)
    {
      printf("ERROR: Please enter correct amount of arguments."); 
      exit(0);
    }
  
    FILE *fp = fopen(argv[1], "r");
    int time = atoi(argv[2]);
    int size=0;
  
    printf("Seconds File Size");
  
    while(1)
    {
      fseek(fp, 0L, SEEK_END);
      size = ftell(fp);
  
      sleep(4);
    }
    fclose(fp);
  }
  </code></pre>