Problem 2: Code (80 points) Using the given struct below, create the two following functions (do not modify the function void fill_train(train car train, FILE *fp) (50 points) This function takes an array of train_carstructs and fills each struct with info from a file (sampl array is size 3 (hint: the easiest way to do this is to read in the file a specific way). The price m void print_train(train_car* train, int size) (30 points) This function prints out the info from the struts that make up the trainarray. For the sample fil Train car 1:25 passengers, price: $10.99 Train car 2:30 passengers, price: $10.99 Train car 3:4 passengers, price: $5.99 (10 points-correctly accessing each array 7.5 points-correctly printing each passenger amount. 7.5-c Struct: typedef struct train car int num passengers: char size; float price: train car: Sample File: 25-m umber of passengers-size 30-1 HE FILE) (20 points). The size of the array is determined by the number of lines in the file (5 points), for example, if a file has 3 lines of info, then that means umber of passengers is less than 10 (10 points)and 10.99 otherwise (10 points). Don't forget to close the file when you are done (5 points) -erall correct match for each line in the sample run) ES VAN Question 2 Problem Code 10 Udvent.create the world action dedirtti vold cartra FILES This function the way of the event. AADKOO THE PLOT MO anayet viest way to do that the others who 1000. Dos coste wed/ The action priestorom the stomach. For the love I would T125g 50:29 Trenca 2.00 5309 110 poco che che corpore marche SINCE det Wenger Sama 301 HE FILE) (20 points). The size of the array is determined by the number of lines in the file (5 points), for example, if a file has 3 lines of info, then that means umber of passengers is less than 10 (10 points)and 10.99 otherwise (10 points). Don't forget to close the file when you are done (5 points) -erall correct match for each line in the sample run) 54 words BOF function declaration points you do the fle sample we given below.do not HARDCODE THE FILE (20 points. The size of the array is determined by the number of lines in the files points for example, thus lines of into the trust means the The price member instruct should be the number of paris less than 100 points and 10.99 otherwise (10 points. Don't forget to close the file when you are done 5 point the sample Meglven the output would look nout, Scanding each peke. 5 powers.comvet match for each one in the sole run Problem 2: Code (80 points) Using the given struct below, create the two following functions (do not modify the function void fill_train(train car train, FILE *fp) (50 points) This function takes an array of train_carstructs and fills each struct with info from a file (sampl array is size 3 (hint: the easiest way to do this is to read in the file a specific way). The price m void print_train(train_car* train, int size) (30 points) This function prints out the info from the struts that make up the trainarray. For the sample fil Train car 1:25 passengers, price: $10.99 Train car 2:30 passengers, price: $10.99 Train car 3:4 passengers, price: $5.99 (10 points-correctly accessing each array 7.5 points-correctly printing each passenger amount. 7.5-c Struct: typedef struct train car int num passengers: char size; float price: train car: Sample File: 25-m umber of passengers-size 30-1 HE FILE) (20 points). The size of the array is determined by the number of lines in the file (5 points), for example, if a file has 3 lines of info, then that means umber of passengers is less than 10 (10 points)and 10.99 otherwise (10 points). Don't forget to close the file when you are done (5 points) -erall correct match for each line in the sample run) ES VAN Question 2 Problem Code 10 Udvent.create the world action dedirtti vold cartra FILES This function the way of the event. AADKOO THE PLOT MO anayet viest way to do that the others who 1000. Dos coste wed/ The action priestorom the stomach. For the love I would T125g 50:29 Trenca 2.00 5309 110 poco che che corpore marche SINCE det Wenger Sama 301 HE FILE) (20 points). The size of the array is determined by the number of lines in the file (5 points), for example, if a file has 3 lines of info, then that means umber of passengers is less than 10 (10 points)and 10.99 otherwise (10 points). Don't forget to close the file when you are done (5 points) -erall correct match for each line in the sample run) 54 words BOF function declaration points you do the fle sample we given below.do not HARDCODE THE FILE (20 points. The size of the array is determined by the number of lines in the files points for example, thus lines of into the trust means the The price member instruct should be the number of paris less than 100 points and 10.99 otherwise (10 points. Don't forget to close the file when you are done 5 point the sample Meglven the output would look nout, Scanding each peke. 5 powers.comvet match for each one in the sole run