Please don\'t answer the entire problem. I just need to know how to start readin
ID: 3828184 • Letter: P
Question
Please don't answer the entire problem. I just need to know how to start reading the data in the file. The data has 18 rows, but each row has a different number of columns. The hint at the bottom only confuses me. I've been trying to use fscanf without inputting a size, but I feel like there is a simpler way to go about this. Can anyone please tell me how to start reading the data?
4. The Computational Engineering Methods class has 18 sections in Fall 2016. Each section started ith 19 students in the class. During the course of the semester, several students dropped the class. As an end semester report the instructor-in-charge for the course needs to submit an analysis of student performance for all the secti ons to the College of Engineenng. The student score data is uploaded in file secgrades.tzt on ELC and Piazza. The data in the file is formatted as following Section No No. of Students Stud 1 score Stude score Studs score Stud 4 score 53 13 68 100 81 56 17 84 88 The data contains section number, number of students in each section at the end of the course and the average grades of all the students in eachrow for one section. There are 18 such rows for 18 sections and a maximum of 19 students in a section. Use the data from secgrades.tzt to perform the analysis for class performance and create the figure as shown belo analysls Average Number The first subplot shows the percent of students who finished the course as a bar chart with average grade for each section overlaid as aline plot. The second subplot shows a pie chart with total number of students passed and failed in the class. Write a scipt file NNGRII40Analysis to perform this analysis and plot the figure exactly as shown above. Print the scn pt and figure for submission. Please label the figure appropnately Hint: You will need to write a loop iterating aver the different sections. Inside the laop read ane data entry fram the file for the current section mimber Affer that read anather data entry for the nimber of students in the current section Then read grades data for these many number ofstudents fram the fle Mind the number of students passed and failed and keep adding them ta a variable Mind them grade and percent of number of students and build a vectar with these values using concatenatian Rinally use Subplat and ather platting aptions ta buld the figure.Explanation / Answer
int score[19];
int section_no;
int no_of_students;
for (i = 0; i < 18; i++){
fscanf(fp, "%d %d", §ion_no, &no_of_students);
for (j = 0; j < no_of_students; j++){
fscanf(fp, "%d", &score[j]);
}
}