For example the given program
FILE *f = fopen("test.txt","w");
double d = 5.2;
fwrite(&d, sizeof(typeof(d)), 1, f);
fclose(f);
when U use xxd
to view the content I get
//binary
0000000: 11001101 11001100 11001100 11001100 11001100 11001100 ......
0000006: 00010100 01000000 .@
//hex
0000000: cdcc cccc cccc 1440 .......@
but I found How to represent FLOAT number in memory in C that it should look like
0 10000001 01001100110011001100110
so I am not sure if its the same binary in memory and file or I am completely wrong. How can i determine the float value from given example?