Good Evening
21:03 pm

Sponsor Area

Sponsor Area

Question is

Write a definition for function Economic() in C++ to read each record of a binary file ITEMS.DAT, find and display those items, which costs less than 2500. Assume that the file ITEMS.DAT is created with the help of objects of class ITEMS, which is defined below:

class ITEMS
{
	int ID;char GIFT[20]; float Cost;
public:
	void Get()
	{
		cin>>CODE;gets(GIFT);cin>>Cost;
	}
	void See()
	{
		cout<<ID<<':'<<GIFT<<':'<<Cost<<endl;
	}
	float GetCost()
	{
		return Cost;
	}

};

Mock Test Series

Sponsor Area

Sponsor Area

NCERT Book Store

NCERT Sample Papers

Entrance Exams Preparation