title: Dynamically inputting values in a structure and printing these values
body: <p>I wrote this code for a structure stud, that will input the number of students whose record is to be stored, and then print the same. I'm not sure where exactly I'm going wrong.</p>
  <pre><code>#include&lt;stdio.h&gt;
  struct stud{
  int id;
  char name[50];
  float points;
  }s[1000];
  
  int main(){
  
       int i,n;
       scanf(&quot;%d&quot;,&amp;n);
  
       for(int i=0;i&lt;n;i++){
           scanf(&quot;%d&quot;,&amp;s[i].id);
           scanf(&quot;%c&quot;,s[i].name);
           scanf(&quot;%f&quot;,&amp;s[i].points);
          }
         
         for(i=0;i&lt;n;i++){
             printf(&quot;ID: %d\n&quot;,s[i].id);
             printf(&quot;First Name: %c\n&quot;,s[i].name);
             printf(&quot;Points: %f\n&quot;,s[i].points);
          }
  
         return 0;
   }
  </code></pre>