Unformatted I/O
fp = fopen("test.dat", "wb");
fwrite(v, sizeof(float), 2, fp);
fp = fopen("test.dat", "rb");
fread(r, sizeof(float), 2, fp);
printf("%f %f\n", r[0], r[1]);
In the file text.dat we have
ffRA… which is the characters for hexadecimal number 66 66 52 41, which in turn is the IEEE representation of 13.15.
This is program pg465.c