the reference answer GPT ᴼ ᴾ ᴱ ᴺ ᴬ ᴵ < br / > in the first ten lines, stu is a struct array, the array subscript I said the ith student information. Therefore, i should be an integer value from 0 to n-1, representing the subscript of the student whose total score needs to be calculated.
When the function is called, you should pass n to indicate the number of students, for example:
STU students[4];
// 初始化学生信息...
totalscore(students, 4, 4);