Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Tianyu will manage student grades stored in the following CSV (comma-separated values) file format: 123,78,90456,100,88.//morevaluesfollow Each line has three fields for one student: ID, MP_Score
Tianyu will manage student grades stored in the following CSV (comma-separated values) file format: 123,78,90456,100,88.//morevaluesfollow Each line has three fields for one student: ID, MP_Score and Exam_Score. You can assume that all IDs are unique, and that all fields are positive valid int32_t values. You can also assume that the total number of students is at least 1 and at most 200 . - Your first task is to complete the function read_file below assuming the following requirements: 1. Read student grade data from the file data . csv. Hint: use fscanf(). 2. Store all students' ID and final_score (sum of MP_Score and Exam_Score) into grade_list data structure (no need to sort final_score or ID values). 3. Count the total number of students and fill-in num_students field in grades_ t. The function returns 0 for success, and 1 for failure. Everything written beyond the lines provided will be IGNORED. Not all blank lines need to be filled. // list points to a valid grades_t int32 t read_file (grades_t list) } // open the file data..csv for read
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started