title: format '%s' expects argument of type '*char' but argument 2 has type 'int'
body: <p>When I try to compile my program I get the warning message in the title and when I run it after scanning the names and scores it just stops. I encountered this problem a lot of times while practicing working with strings, but I haven't been able to find a solution. </p>
  
  <pre><code>#include &lt;stdio.h&gt;
  
  struct students {
      char name[20];
      int score[20];
  } student;
  int main() {
  int i, n;
      printf("Number of students:\n");
      scanf("%d", &amp;n);
      for(i=0; i&lt;n; i++) {
          printf("Name of the student:\n");
          scanf("%s", &amp;student.name[i]);
          printf("Score of the student:\n");
          scanf("%d", &amp;student.score[i]);
      }
  for(i=0;i&lt;n;i++) {
      if(student.score[i] &gt;= 15) {
          printf("%s passed the exam\n", student.name[i]); }
      else {
          printf("%s failed the exam\n", student.name[i]);
      }
      }
  return 0;
  }
  </code></pre>