10.docx - Name Aditya D Pharande STD SE Roll NO A-22 CODE...

This preview shows page 1 - 3 out of 7 pages.

/* Name : Aditya D. Pharande STD : SE. Roll NO. : A-22. */ // CODE /* Department maintains a student information. The file contains roll number, name, division and address. Allow user to add, delete information of student. Display information of particular employee. If record of student does not exist an appropriate message is displayed. If it is, then the system displays the student details. Use sequential file to main the data. */ #include<iostream> #include<fstream> #include<string.h> using namespace std; class student { typedef struct stud { int roll; char name[10]; char div; char add[10]; }stud; stud rec; public: void create(); void display(); int search(); void Delete(); }; void student::create()
Image of page 1

Subscribe to view the full document.

{ char ans; ofstream fout; fout.open("stud.dat",ios::out|ios::binary); do { cout<<"\n\tEnter Roll No of Student : "; cin>>rec.roll; cout<<"\n\tEnter a Name of Student : "; cin>>rec.name; cout<<"\n\tEnter a Division of Student : "; cin>>rec.div; cout<<"\n\tEnter a Address of Student : "; cin>>rec.add; fout.write((char *)&rec,sizeof(stud))<<flush; cout<<"\n\tDo You Want to Add More Records: "; cin>>ans; }while(ans=='y'||ans=='Y'); fout.close();
Image of page 2
Image of page 3
  • Fall '19
  • Division of Student

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern