Advertisement Remove all ads

Find the Output of the Following C++ Code Considering that the Binary File Member.Dat Exists on the Hard Disk with Records of 100 Members - Computer Science (C++)

Advertisement Remove all ads
Advertisement Remove all ads
Advertisement Remove all ads

Find the output of the following C++ code considering that the binary file MEMBER.DAT exists on the hard disk with records of 100 members :

c1ass MEMBER
  int Mno; char Name[20];
  void In();void Out();

void main()
  fstream MF;"MEMBER. DAT" , ios::binary|ios::in);,

  MEMBER M;*)&M, sizeof(M));
  MF. read( (char*) &M, sizeof (M));
  MF. read ((char*) &M, si:zeof (M));
  int POSITION= MF. te11g 0 / sizeof (M);
  cout<<"PRESENT RECORD:"<<POSITION<<end1;
Advertisement Remove all ads


Present Record: 3

Concept: Binary File in C++ :- Creation of File, Writing Data into File, Searching for Required Data from File, Appending Data to a File, Insertion of Data in Sorted File, Deletion of Data from File, Modification of Data in a File
  Is there an error in this question or solution?
Advertisement Remove all ads

View all notifications

      Forgot password?
View in app×