+1(316)4441378

+44-141-628-6690

Archive for the ‘codeblocks’ Category

C Program needed

[prob1.c][100%] Develop a C program to read hurricane data and store and sort those hurricane data.
Each hurricane record contains the hurricanes name, year, month, and category. An input file named
hurricane.txt contains 100 hurricane records. Your program will perform the following tasks.
a) Read hurricane data from input file hurricane.txt and store them in an array of structure. The
structure definition is shown below. Then write the hurricane data stored in the array of structure
to a binary file named hurricane.bin.
typedef struct hurricane
{
char name[20];
int year;
int month;
int category;
}H_RECORD;
b) Create a new structure for storing the same hurricane data. This new structure should contain the
same members (name, year, month, and category) but utilize a minimum size as a data type.
Take the definition of the new structure shown below as an example. Design this new structure
so that the value sizeof(H_RECORD_MIN) is minimized