Assume thаt yоu hаve а CSV file which cоntains the infоrmation for each student and the scores for 4 homeworks. The structure for the data is - student ID, student Name, hw1, hw2, hw3, hw4. See the example below. 1,John Doe,20,30,28,18 2,Jane Doe,35,50,27,36 3,Mary,17,20,34,44 Write the code that does the following: (10%) Student struct definition given the input data. Assume that name can be up to 20 characters and all other data values are integers. The struct definition must be written at the top outside main or any other function. (10%) Read the input and output file names into two different strings, with the appropriate mode. (10%) Open the input file, provided as input for reading and check if it was opened successfully. If not, "return -1". (15%) Go through the file once and calculate the number of lines in the file. Assume, there is NO header row. (5%) Dynamically allocate the array for the Student struct. (15%) Read the file again and store the data into the dynamically created array above. (5%) Close the input file being read. (10%) Open the output file, provided as input for writing and check if it was opened successfully. If not, "return -2". (10%) Go through the array and calculate the AVERAGE grade out of the 4 homeworks, for each student. Write the student ID, name, and the calculated value into the output file. Following is the sample output file for the given input file example. 1,John Doe,18 2,Jane Doe,27 3,Mary,17 (5%) Close the output file. (5%) Free the dynamically allocated array and end the main function. Assumptions: You are writing this code in ONLY ONE file - main.c. And there are no other files in the project. You can create functions if you would like to, but are not required to do so.