You are to modify the program I wrote for Problem Set VIII which reads the data in the pirates.dat file and prints the player information in table form. Use the following function prototypes to create three (3) new versions of the program.
In the previous Problem Set you used the dot operator (.) to access the members of a structure. Here you will use the pointer operator (->).
float calc_avg( int, int);
Use a local variable to store the average before returning it so you can see the value when tracing through the function.
float calc_avg( struct player_s *);
void calc_avg( struct player_s *);
Using any one of the above versions that you have created, you are then to write print_table_row() in program baseball4.c using the following prototype:
void print_table_row( struct player_s *p);This function should be called from the loop which is used to print the table.
You are to turn in a single sheet of paper which lists each of the three calc_avg() function prototypes given above, the call to each of the functions, and the code for each of the functions. Finally, you should provide the function prototype for print_table_row(), the code for the function and the code for the loop.