Tis union should itself contain two structures one for


1.Write a C program that reads several different names and addresses into the computer, rearranges the names into alphabetical order, and then writes out the alphabetized list. Make use of structure variables within the program

2.Write a C program that will accept the following information for each team in a baseball or a football league.

1. Team name, including the city (e.g., Pittsburgh Steelers)

2. Number of wins

3. Number of losses
For a baseball team, add the following information:

4. Number of hits

5. Number of runs

6. Number of errors

7. Number of extra-inning games
Similarly, add the following information for a football team:

4. Number of ties

5. Number of touchdowns

6. Number of field goals

7. Number of turnovers

8. Total yards gained (season total)

9. Total yards given up to opponents

Enter this information for all of the teams in the league. Then reorder and print the list of teams according to their win-lose records, using the reordering techniques described in Examples 9.13 and 10.16 (see also Examples 9.21 and 10.26). Store the information in an array of structures, where each array element (i.e., each structure) contains the information for a single team. Make use of a union to represent the variable information (either baseball or football) that is included as a part of the structure. This union should itself contain two structures, one for baseball-related statistics and the other for football-related statistics. Test the program using a current set of league statistics. (Ideally, the program should be tested using both baseball and football statistics.)

Request for Solution File

Ask an Expert for Answer!!
Basic Computer Science: Tis union should itself contain two structures one for
Reference No:- TGS01509759

Expected delivery within 24 Hours