Please help me in the significance of get() in the following C++ code : Here is my code.This is a problem relating to file handling where we input data to a file and then display its contents. I am unable to understand how the line cin.get(ch); helps in the output. If find that if i remove this line from the code,the program is unable to take the input for the variable marks in the second iteration. Why is it so ? I am a bit confused in the working of get() here . Thanks in advance 

     #include<iostream>
     #include<conio>
     #include<fstream>
     int main()
     {
      
      ofstream fout;
      fout.open("student",ios::out);
      char name[30],ch;
      float marks=0.0;
      for(int i=0;i<5;i++)
      {
       cout<<"Student "<<(i+1)<<":\t Name:";
       cin.get(name,30);
       cout<<"\t\t Marks: ";
       cin>>marks;
       cin.get(ch); **// the confusion is in this line**
       fout<<name<<"\n"<<marks<<"\n";
      }
      fout.close();
      ifstream fin;
      fin.open("student",ios::in);
      fin.seekg(0);
      cout<<"\n";
      for(i=0;i<5;i++)
      {
       fin.get(name,30);
       fin.get(ch);
       fin>>marks;
       fin.get(ch);
       cout<<"Student Name: "<<name;
       cout<<"\t Marks: "<<marks<<"\n";
      }
      fin.close();
      return 0;
    }