Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribedimage text in transcribed

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Visual C# And Databases

Authors: Philip Conrod, Lou Tylee

16th Edition

1951077083, 978-1951077082

More Books

Students also viewed these Databases questions

Question

List the advantages and disadvantages of the pay programs. page 536

Answered: 1 week ago

Question

Define Management by exception

Answered: 1 week ago

Question

Explain the importance of staffing in business organisations

Answered: 1 week ago

Question

What are the types of forms of communication ?

Answered: 1 week ago

Question

Explain the process of MBO

Answered: 1 week ago