Question: I need help with this please What I have is below! #include #include #include #include #define MAX_REC 100 #define MAX_LINE 100 typedef struct { //

I need help with this please
What I have is below!
#include
#define MAX_REC 100 #define MAX_LINE 100
typedef struct { // your } RECORD;
char letter_grade(float s); int import_data(RECORD dataset[], char *filename); //return the number of records int report_data(RECORD dataset[], int n, char *filename); //return status
char letter_grade(float s){ // your code }
int import_data(RECORD dataset[], char *filename) { // your implementation }
int report_data(RECORD dataset[], int n, char *filename) { // your implementation }
Test code:
#include "myrecord.h" int main(int argc, char *args[]) { char infilename[40] = "marks.txt"; //default input file name char outfilename[40] = "report.txt"; //default output file name if (argc > 1) { if (argc >= 2) strcpy(infilename, args[1]); if (argc >= 3) strcpy(outfilename, args[2]); } RECORD dataset[MAX_REC]; int record_count = 0; record_count = import_data(dataset, infilename); if (record_count >=1) report_data(dataset, record_count, outfilename); else printf("no data is found"); return 0; }Question 1 Write a C program named myrecord.h to process and report mark records. The mark records are given by comma-separated values (CSV) format in file marks.txt. Compute average, standard deviation and letter grades, output results to a file named report.xt. myrecord.h contains the following I. definition of a structure named RECORD to hold a person's name of 20 characters and the score of float type 2. char letter grade float score ; this function converts a float score to a letter grade according to ranges A 85 100 - 70, 85), 60 70) D 50 60), F 0.50), and tr returns the letter grade. datasetJ. and rcturns the number of records read results to filc of namc passed by filenamc 3. int import data(record dataset[], char *ilename) his function imports data from file of name passed by filename, and stores all record entries in an array of RFCORD 4. void report_data (RECORD dataset[], int count, char filename); this function computes the average score, standard deviation and letter grades of dataset] outputs the
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
