Hi guys I read a binary file which consists of 1000 records of unknown C structure. Structure has these data types char (1 byte) int (4 bytes) long long int (8 bytes) float (4 bytes) and double (8 bytes) and at the end of each record there is a double variable which keeps average of all other data fields in that record. Maximum data field in the structure can be 11 (including average field). for example
struct data{
char v1;
int v2;
float v3;
double v4;
long long int v5;
int v6;
double avg;
}
I could not find a way to check the type of the variable which I read from binary file.Only thing I need is a hint just can you tell me a way how to find data type.