struct foo {
int a;        // 2 or 4 bytes?
float b;        // 4 or 8 bytes?
};

fread(&bar, (sizeof) foo, 1, fp);