title: C - fprintf isn't writing to file
body: <p>C - fprintf isn't writing to file, any idea why?</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;stdlib.h&gt;
  int main(void){
      FILE* pfile=fopen("/home/user-vlad/Programming/C-other/meme.txt","r");
      if(pfile==NULL){
          printf("ERROR: Stream is equal to NULL\n");
          exit(1);
      }
      fprintf(pfile,"Hello");
      fclose(pfile);
      return 0;
  }
  </code></pre>
  
  <p>Compiler: clang, OS: FreeBSD</p>