title: C scanf() doesn't parse my input
body: <p>I am writing a C program and that program objective is I want to enter only 4 students details with structures. But my program missing something so my program exiting after entering the first student details. Look at here please </p>
  
  <pre><code># include &lt;stdio.h&gt;
  
  struct student
  {
  int no;
  char name[20];
  float marks;
  }s[10];
  
  int main()
  {
  int i,n;
  
  
  printf(" enter number of students ");
  scanf("%d",&amp;n);
  
  printf(" enter student Number Name marks ");
  for(i=0;i&lt;n;i++)
  {
  scanf("%d%c%f",&amp;s[i].no,&amp;s[i].name,&amp;s[i].marks);
  }
  return 0;
  }
  </code></pre>
  
  <p>the program quits after entering one student details even I have selected number of students as 4 .</p>
  
  <p>The inputs I am giving here as</p>
  
  <pre><code>[root@localhost raja]# gcc -o s s.c
  [root@localhost raja]# ./s
   enter number of students 4
   enter student Number Name marks 1 as 12.03
  [root@localhost raja]# 
  </code></pre>
  
  <p>its quitting the program even after entering only 1st student details.
  help me.</p>