program is to store first n natural no in a


Program is to store first n natural no in a file:

Write a program to store first n natural no in a file

void main()

    {

    fstream file;

    file.open("student.dat",ios::in|ios::out|ios::app);

    int n;

    cout<<" enter record to be modified ";

    cin>>n;

    file.seekg((n-1)*sizeof());

    file.read((char *)&  ,sizeif());

    file.write((char *)&  ,sizeof());

    file.close();

    }

Request for Solution File

Ask an Expert for Answer!!
C/C++ Programming: program is to store first n natural no in a
Reference No:- TGS0174910

Expected delivery within 24 Hours