データ型 | ビット幅 | 呼称 | 範囲 | |
---|---|---|---|---|
文字型 | char | 8 | 文字型 | -128 〜 127 |
unsigned char | 8 | 符号なし文字型 | 0 〜 255 | |
整数型 | short (int) | 16 | 符号付き短長整数型 | -32768 〜 32767 |
unsigned short (int) | 16 | 符号なし短長整数型 | 0 〜 65535 | |
int | 32 | 符号付き(倍長)整数型 | -2147483648 〜 2147483647 | |
long (int) | ||||
unsigned (int) | 32 | 符号なし(倍長)整数型 | 0 〜 4294967295 | |
unsigned long (int) | ||||
浮動小数点型 | float | 32 | 実数型 | およそ 10-38 〜 1038 (有効数字7桁) |
double | 64 | 倍精度実数型 | およそ 10-308 〜 10308 (有効数字15桁) | |
型なし | void | - | - | - |