Section D: Writing Code [10 marks] Write the code to implement the following: Write the function: int LoadHighScores (AS
Posted: Fri Jun 10, 2022 11:58 am
Section D: Writing Code [10 marks] Write the code to implement the following: Write the function: int LoadHighScores (AScore Score Table, int Length, char *Filename); that opens the file Filename and reads the contents into the array of structures ScoreTable that has Length elements. If there are more than Length entries in the file Filename, you should only read Length elements. If there are less than Length entries in the file Filename, you should fill the remaining elements with default placeholder entries. The format of the structure AScore is: #typedef { char Name[21]; char Planet[21]; int Fuel; int Score;} AScore;