[求助]浮点数存储问题(空间实体的理解)
//=====================================
// f0312.cpp
// 空间实体的理解
//=====================================
#include<iostream>
using namespace std;
//-------------------------------------
int main(){
float f = 34.5;
int* ip = reinterpret_cast<int*>(&f);
cout<<"float address: "<<&f<<"=>"<<f<<endl;
cout<<" int address: "<<ip<<"=>"<<*ip<<endl;
*ip = 100;
cout<<" int: "<<*ip<<endl;
cout<<"float: "<<f<<endl;
cin.get();
}//====================================
请问,输出中最后一行是怎么来的,为什么?
/*
float address: 0x241ff5c=>34.5
int address: 0x241ff5c=>1107951616
int: 100
float: 1.4013e-43
*/