本文共 1139 字,大约阅读时间需要 3 分钟。
int main(){ printf("sizeof(unsigned char)=%d\n",sizeof(unsigned char)); printf("sizeof(char)=%d\n",sizeof( char)); printf("sizeof(int)=%d\n",sizeof( int)); printf("sizeof(unsigned int)=%d\n",sizeof( unsigned int)); printf("sizeof(float)=%d\n",sizeof( float)); printf("sizeof(double)=%d\n",sizeof( double)); printf("sizeof(long)=%d\n",sizeof( long)); printf("sizeof(unsigned long)=%d\n",sizeof( unsigned long)); printf("sizeof(long long)=%d\n",sizeof( long long)); printf("sizeof(unsigned long long)=%d\n",sizeof( unsigned long long)); printf("1<<8=:%d \n",1<<8); printf("1<<16=:%d \n",1<<16); printf("0x12345678&0xffff=%x \n",0x12345678&0xffff); printf("0x12345678|0xffff=%x \n",0x12345678|0xffff); return 0;}
Starting H:\QT_temp\build-test-unknown-Default\test.exe...sizeof(unsigned char)=1sizeof(char)=1sizeof(int)=4sizeof(unsigned int)=4sizeof(float)=4sizeof(double)=8sizeof(long)=4sizeof(unsigned long)=4sizeof(long long)=8sizeof(unsigned long long)=81<<8=:256 1<<16=:65536 0x12345678&0xffff=5678 0x12345678|0xffff=1234ffff H:/QT_temp/build-test-unknown-Default/test.exe exited with code 0
转载地址:http://aiwsi.baihongyu.com/