#include
void main()
{
double a;
float b;
unsigned char *p,*q;
unsigned char m[sizeof(a)]={0};
int i;
a=6559.8;
b=-659.8;
p=(unsigned char *)(&a);
q=(unsigned char *)(&b);
for(i=0;i<sizeof(a);i++)
{
m[i]=*(p+i);
//printf("%02X",*(p+i));
printf("%X",m[i]);
}
printf("\n");
for(i=0;i<sizeof(a);i++)
{
printf("%02X",*(p+i));
}
printf("\n");
printf("%03d\n",sizeof(a));
printf("\n");
for(i=0;i<sizeof(b);i++)
{
printf("%02X",*(q+i));
}
printf("\n");
printf("%03d\n",sizeof(b));
printf("\n");
}