Good Morning
07:27 am

Sponsor Area

Sponsor Area

Question is

Write a definition for function BUMPER( ) in C++ to read each object of a binary file GIFTS.DAT, find and display details of those gifts, which has remarks as “ÖN DISCOUNT”. Assume that the file GIFTS.DAT is created with the help of objects of class GIFTS, which is defined below:

class GIFTS
{
	int ID;char Gift[20],Remarks[20]; float Price;
public:
	void Takeonstock()
	{
		cin>>ID;gets(Gift);gets(Remarks);cin>>Price;
	}
	void See()
	{
		cout<<ID<<':'<<Gift<<':'<<Price<<':'<<Remarks<<endl;
	}
	char *GetRemarks(){return Remarks;}
}

Mock Test Series

Sponsor Area

Sponsor Area

NCERT Book Store

NCERT Sample Papers

Entrance Exams Preparation