锘??xml version="1.0" encoding="utf-8" standalone="yes"?>
緇撴灉鍙樻垚
230+225+219+217=1107951616
鍘熸潵鐨勭▼搴忎負
#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;
}
涓婇潰鐨?4.5=100010.1錛?錛?br />聽聽聽聽聽聽聽聽=1.000101*25錛?錛?br />聽聽聽聽聽 =0錛?0000100錛?0010100000000000000000鎴戠湅涓嶅お鎳?甯屾湜鑳藉緱鍒頒綘浠殑鎸囩偣![]()
using namespace std;
int main()
{cout<<("join"=="join" ? "":"not")<<"equal\n";
getchar();
char* str1="good";
char* str2="good";
cout<<(str1==str2 ? "": "not")<<"equal\n";
getchar();
char buffer1[6]="hello";
char buffer2[6]="hello";
cout<<(buffer1==buffer2 ? "" : "not")<<"equal\n";
getchar();
}
涔︿笂鏄劇ず緙栬瘧鍚庣粨鏋滄槸
not equal
not equal
not equal
浣嗘槸鎴戠紪璇戝悗鏄劇ず鐨勭粨鏋滄槸
equal
equal
not equal
璇烽珮鎵嬫寚鐐規寚鐐瑰摝錛侊紒