32位機器環境下結果如下:
| Type |
Size |
數值范圍 |
| 無值型void |
0 byte |
無值域 |
| 布爾型bool |
1 byte |
true false |
| 有符號短整型short [int] /signed short [int] |
2 byte |
-32768~32767 |
| 無符號短整型unsigned short [int] |
2 byte |
0~65535 |
| 有符號整型int /signed [int] |
4 byte |
-2147483648~2147483647 |
| 無符號整型unsigned [int] |
4 byte |
0~4294967295 |
| 有符號長整型long [int]/signed long [int] |
4 byte |
-2147483648~2147483647 |
| 無符號長整型unsigned long [int] |
4 byte |
0~4294967295 |
| long long |
8 byte |
0~18446744073709552000 |
| 有符號字符型char/signed char |
1 byte |
-128~127 |
| 無符號字符型unsigned char |
1 byte |
0~255 |
| 寬字符型wchar_t (unsigned short.) |
2 byte |
0~65535 |
| 單精度浮點型float |
4 byte |
-3.4E-38~3.4E+38 |
| 雙精度浮點型double |
8 byte |
1.7E-308~1.7E+308 |
| long double |
