हिंदी

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++)

Advertisements
Advertisements

प्रश्न

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];
pub1ic:
  void In();void Out();
};

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

  MEMBER M;
  MF.read((char*)&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;
  MF.c1ose();
}

उत्तर

Present Record: 3

shaalaa.com
  क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
2014-2015 (March) All India Set 4
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×