6.3w+
社区成员
#include <iostream>
using namespace std;
void main()
{
int i = 875770417; //在内存中的表示从低位到高位依次是0x31 0x32 0x33 0x34
cout<<i<<" ";
char* p = reinterpret_cast<char*>(&i);
for(int j=0; j<4; j++)
cout<<p[j];
cout<<endl;
float f = 0.00000016688933; //在内存中的表示从低位到高位依次也是0x31 0x32 0x33 0x34
cout <<f<<" ";
p = reinterpret_cast<char*>(&f);
for(j=0; j<4; j++)
cout<<p[j];
cout<<endl;
}