Question: (a) Write a suitable set of type declarations for representing a list of football matches, where each match records the names of two competing teams

(a) Write a suitable set of type declarations for representing a list of football matches, where each match records the names of two competing teams and their integer scores. All matches are played in the same year, and this year should also be recorded. There are no limits on the number of matches, or on the length of team names.

(b) Based on your answer for part (a), show how to dynamically allocate the necessary memory for a set of 25 matches, where all the team names are at most 15 characters long. Initialisation is not required, except to allocate memory.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!