NOTE: make sure to use all of these functions. int loadArray(char* filename): Th
ID: 3559550 • Letter: N
Question
NOTE: make sure to use all of these functions.
int loadArray(char* filename): This function takes the input file name and opens the file. If unable to open the file, return 0. If able to open the file, it loads the data from the text file into the global structure array and then returns the size of the input (the first line of the text file is the size). Sample code is already provided for this function.
void printArray(int size): This function takes an integer size and displays the data stored in the global structure array as shown in the sample output below. The output should be correctly formatted.
int updateArray(char * filename, int n): This function is similar to the loadArray function but takes the update file name and the number of students whose information is already stored in the global structure array. It opens a text file (update.txt), reads new student information, and then adds the new student information to the existing student information in the global structure array. If unable to open the file, return zero. Otherwise, return the size of the
Explanation / Answer
1.2.3.4.5.6.7.8.9.10.11.12.13.; 14.Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.