Page 162 - C++
P. 162
void Disp();
void MarksScore();
long R_AID() { return AId;)
};
void ScoreUpdate(long Id)
{
fstream File;
File.open("APPLI.DAT", ios::binary|ios::in|ios::out);
Applicant A;
int Record=0, Found=0;
while(!Found && File.read((char*) & C, sizeof(c)))
{
if(Id==A.R_AId())
{
cout<< "Enter new Score";
A.MarksScore ();
-----------------
-----------------
Found=1;
}
Record++;
}
if(Found==1) cout << "Record Updated";
File.close();
}
Write the statement1 to position the File Pointer at the beginning of the record for which the applicant’s Id
matched with the argument passed, and statement2 to write the updated record at that position.
OR
(c ) Which file stream is required for tellg() ? (1)