Scan records and return the earliest best record

Define a Student record with integer id and mark. Write a function returning the highest-mark Student from a nonempty array; ties must select the earliest input record. Also write a total-marks function. Your full program reads 0<=n<=6 and n id/mark pairs; ids are 1..999 and marks 0..100. Print EMPTY for n=0; otherwise print best=ID mark=M total=T. Never call the best-record function on an empty array; state that function’s precondition. Use const for array parameters that only read records. For the tie sample 4 / 11 70 / 12 92 / 13 92 / 14 40, explain why id 12 wins.


