title: c : gets() and fputs() are dangerous functions?
body: <p>In the computer lab at school we wrote a program using <code>fputs</code> and the compiler returned an error <code>gets is a dangerous function to use</code> and a similar error for <code>fputs</code><br/><br/>
  but at home when i type in this bit of code:</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  main()
  {
      FILE *fp;
      char name[20];
      fp = fopen("name.txt","w");
      gets(name);
  
      fputs(name,fp);
      fclose(fp);
  }
  </code></pre>
  
  <p>i get no errors what so ever. The one at school was similar to this one, just a bit lengthy and having more variables.<br/>
  I use codeblocks at home and the default gcc provided with fedora at school.<br/>
  Could it be a problem with the compiler?</p>