![]() |
#2
吹水佬2022-10-19 23:52
|

#include<stdio.h>
int main()
{
struct
{
int i;
double d;
}record1;
record1.i=0x12345678;
record1.d=0x12345678;
return 0;
}
int main()
{
struct
{
int i;
double d;
}record1;
record1.i=0x12345678;
record1.d=0x12345678;
return 0;
}
查看内存d存的为什么不是0x0000000078563412?是和浮点数规格化有关吗?
0x61fe10: 0x78 0x56 0x34 0x12 0x00 0x00 0x00 0x00
0x61fe18: 0x00 0x00 0x00 0x78 0x56 0x34 0xb2 0x41