title: How to create ".log" file in C?
body: <p>I need to create .log file using C. However, I cannot use the usual way to create this. The file is created but it cannot write. Can anyone explain?</p>
  
  <pre><code> f = fopen("file.log", "w"); 
   fprintf(f, "print this"); 
  </code></pre>