file-handling · intermediate · ~15 min
Deserialise a fixed record in the same field order.
Implement int load_record(const char *path, int *id, int *score) reading the two ints written by save_record. Return 0 on success, -1 on failure.
#include <stdio.h>
int load_record(const char *path, int *id, int *score) {
/* TODO */
return -1;
}
Solve this exercise in the browser editor — compile and run against the test harness, no setup required.