title: why is my program stopped working after the scanf?
body: <p>i try to make a simple program to enter student information using struct and I'm so confused why is my program stopped right after i input the information
  here's the code</p>
  <pre><code>#include &lt;stdio.h&gt;
     struct studentScore {
     char nim[11];
     char name [30];
     char subjectCode [5];
     int sks;
     char grade;
     }students;
  
  
         int main(){
         int i,studNum;
  
          printf(&quot;Name : &quot;);
          scanf(&quot;%s&quot;,students.name);
  
          printf(&quot;\nNIM :&quot;);
          scanf(&quot;%s&quot;,students.nim);
  
          printf(&quot;\nSubject Code :&quot;);
          scanf(&quot;%s&quot;,students.subjectCode);
  
          printf(&quot;\nSKS :&quot;);
          scanf(&quot;%d&quot;,&amp;students.sks);    // Program Crash after i input the SKS
  
          printf(&quot;\nGrade :&quot;);
          scanf(&quot;%c&quot;,students.grade); 
          
  
      for(i=0;i&lt;studNum;i++){
          printf(&quot;\nName : %s\n&quot;,students.name);
          printf(&quot;NIM  : %s\n&quot;,students.nim);
          printf(&quot;Subject Code  : %s\n&quot;,students.subjectCode);
          printf(&quot;SKS  : %d\n&quot;,students.sks);
          printf(&quot;Grade  : %c\n&quot;,students.grade);
      }
      return 0;
  }
  </code></pre>