I have a struct that is defined as:
struct record
{
int age;
char name[12];
int department;
};
I am confused on how to approach this problem if im reading data from a binary file and the data contains structs how can I reverse the order of the bits from big endian to little endian in that struct?