title: File program - fseek isnt working
body: <p>I'm having trouble making this fseek() function work in my code. The text I wrote just doesn't start at the point I indicate and I don't know why. It should start writing from the \n and it just overwrite all the text file. Even if I open it with <code>a</code> it just doesn't go where I command through the parameters.</p>
  
  <pre><code>   fclose(file);
      FILE *file_a = fopen("ex6.txt", "w");
  
      fseek(file_a, -1, SEEK_END);
  
      puts("Write text to add:");
      while((letter = getchar()) != '\n')
      {
          fputc(letter, file_a);
      };
  </code></pre>
  
  <p>What is happening? Why doesnt this work?</p>