Challenge 2: Round-Tripping an int Array Through Binary File I/O — Possible Solution ==================================================================== #include int main() { int original[5] = {10, 20, 30, 40, 50}; FILE *out = fopen("nums.bin", "wb"); if (out == NULL) { return 1; } fwrite(original, sizeof(int), 5, out); fclose(out); int loaded[5]; FILE *in = fopen("nums.bin", "rb"); if (in == NULL) { return 1; } fread(loaded, sizeof(int), 5, in); fclose(in); printf("original: "); for (int i = 0; i < 5; i++) printf("%d ", original[i]); printf("\nloaded: "); for (int i = 0; i < 5; i++) printf("%d ", loaded[i]); printf("\n"); return 0; } Output: original: 10 20 30 40 50 loaded: 10 20 30 40 50 WHY THIS WORKS AS AN ANSWER ------------------------------ Both fopen calls use the binary-mode "wb"/"rb" variants, exactly the mode pairing the chapter specifies for raw byte transfer with no text-mode line-ending translation risk, and fwrite/fread are both called with matching sizeof(int) element size and count (5) -- confirmed correct by printing both arrays and observing them match exactly.