Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The following file is score.txt Use the functions on the board in the picture Please code what is given Task in C language. t is

image text in transcribed

The following file is score.txt

image text in transcribed

Use the functions on the board in the picture

image text in transcribed

Please code what is given Task in C language. t is important you ald include a screenshot of the output. THANK YOUU

TASK: Write a C program that reads information related to students and their grades from a file and print the contents together with the average of the scores scores.txt Gintoki Sakata 45 30 89 Ace Portgas D. 60 80 75 Spike spiegel 65 45 65 killua Zoldyek 70 55 89 Takashi Natsume 80 99 75 Levi Ackerman 80 75 75 - Create a struct with the type Student to hold the following information: - Name of the student - grade from english course - grade from math course - grade from physics course - Assume that you know how many records there are in the file, hence create an array of structs statically - Assume that you know the order of the information and the type of information at each line: name, scores of english, math and physics courses - Write a function to read the contents from scores.txt and store them in the structs you created - Provide the checks for successfully reading from the file - Write a function to print the contents of a struct variable on the screen - Print the contents of the students on the screen - Print the average of each score on the screen - The output looks like this: 5./main Gintoki Sakata 45.00,30.60,80.00 Ace Portgas D. 69.69,89.69,75.69 Spike Spiegel 65.69,45.69,65.00 Killua Zoldyck 70.69,55.69,80.09 Takashi Natsume 80.69,90.69,75.60 Levi Ackermane 89.69,75.69,75.69 average English course grades: 66.67 average Math course grades: 62.50 average Physics course grades: 75.60 Gintoki Sakata 45 30 80 Zce Portgas D. 60 80 75 Spike Spiegel 65 45 65 Killua Zoldyck 70 55 80 Takashi Natsume 80 90 75 Levi Ackerman 80 75 75 \# detine Slat 6 \# define Num_OF-Scores 5 struct Student (){3} //15 pts void store -info ( F(E file, Student: dd)= void print (Student t stu) 33/1/5 ts typedet str... Int main ()3/150 pts

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

Step: 3

blur-text-image

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

Database Design Application And Administration

Authors: Michael Mannino, Michael V. Mannino

2nd Edition

0072880678, 9780072880670

More Books

Students also viewed these Databases questions

Question

122. If X is distributed as N(0, 1), find the pdf of .

Answered: 1 week ago