Everything I\'m finding via google is garbage... Note that I want the answer in C, however if you supplement your answer with a C++ solutio
Use fread() from . The assertions should be replaced with actual error handling code.
#include
#include
#define countof(ARRAY) (sizeof (ARRAY) / sizeof *(ARRAY))
float data[5];
FILE *file = fopen("foo.bin", "rb");
assert(file);
size_t n = fread(data, sizeof(float), countof(data), file);
assert(n == countof(data));
Keep in mind that you might run into endian issues if you transfer files between different architectures.