title: Write to .txt file?
body: <p>How can I write a little piece of text into a <code>.txt</code> file?
  I've been Googling for over 3-4 hours, but can't find out how to do it.</p>
  <p><code>fwrite();</code> has so many arguments, and I don't know how to use it.</p>
  <p>What's the easiest function to use when you only want to write a name and a few numbers to a <code>.txt</code> file?</p>
  <pre><code>char name;
  int  number;
  FILE *f;
  f = fopen(&quot;contacts.pcl&quot;, &quot;a&quot;);
  
  printf(&quot;\nNew contact name: &quot;);
  scanf(&quot;%s&quot;, &amp;name);
  printf(&quot;New contact number: &quot;);
  scanf(&quot;%i&quot;, &amp;number);
  
  fprintf(f, &quot;%c\n[ %d ]\n\n&quot;, name, number);
  fclose(f);
  </code></pre>