QuesAns Print Page – CSKC
Sign In

Search

siteicon
Q&A CBSE12A-2019-A04B-C2 #7026

Question:

A binary file DOCTORS.DAT contains records stored as objects of the following class:

class Doctor
{
  int DNo; char Name[20]; float Fees;
public;
  int *GetNo() { return DNo; }
  void Show()
  { cout<<Dno<<"*"<<Name<<"*"<<Fees<<endl; }
};

Write definition for function Details(int N) in C+, which displays the details of the Doctor from the file DOCTORS.DAT, whose DNo matches with the parameter N passed to the function.