title: String variable in file handling not working
body: <pre><code>void addstd()
  {
      FILE *fp;
      char name[50];
      char ID[5];
      int year;
      float gpa;
      printf(&quot;Input name of student\n&quot;);
      scanf(&quot;%s&quot;,name);
      printf(&quot;Enter ID\n&quot;);
      scanf(&quot;%s&quot;,ID);
      printf(&quot;Enter gpa\n&quot;);
      scanf(&quot;%f&quot;,&amp;gpa);
      printf(&quot;Enter year of admission\n&quot;);
      scanf(&quot;%d&quot;,&amp;year);
      printf(&quot;%s&quot;,name);
      fp=fopen(&quot;report.txt&quot;,&quot;a&quot;);
      fprintf(fp,&quot;%s\t%s\t%0.1f\t%d&quot;,name,ID,gpa,year);
      fclose(fp);
  }
  </code></pre>
  <p>Probably a very silly error from my side, but the <code>name</code> variable is not printing any value in the terminal or in the file.</p>