Page 1 of 1

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
by correctanswer
Section D Writing Code 10 Marks Write The Code To Implement The Following Write The Function Int Loadhighscores As 1
Section D Writing Code 10 Marks Write The Code To Implement The Following Write The Function Int Loadhighscores As 1 (89.17 KiB) Viewed 74 times
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;