データと範囲
2014/05/16
データ型 |
サイズ |
意味 |
範囲 |
bool |
1 Byte |
論理型 |
true(0以外) / false(0) |
char |
1 Byte |
文字型 |
-128 〜 127 |
unsigned char |
1 Byte |
符号なし文字型 |
0 〜 255 |
wchar_t |
2 Byte |
ワイド文字型 |
- |
short (int) |
2 Byte |
短長整数型 |
-32768 〜 32767 |
unsigned short (int) |
2 Byte |
符号なし短長整数型 |
0 〜 65535 |
int |
4 Byte |
整数型 |
-2147486948 〜 2147483647 |
unsigned (int) |
4 Byte |
符号なし整数型 |
0 〜 4294967295 |
long (int) |
4 Byte |
長整数型 |
-2147486948 〜 2147483647 |
unsigned long (int) |
4 Byte |
符号なし長整数型 |
0 〜 4294967295 |
float |
4&npsb;Byte |
単精度浮動小数点型 |
-3.4E+38 〜 3.4E+38 |
double |
8&npsb;Byte |
倍精度実数 |
-1.7E+308 〜 1.7E+308 |
long double |
8&npsb;Byte |
拡張精度浮動小数点型 |
-1.7E+308 〜 1.7E+308 |
__int8 |
1&npsb;Byte |
拡張整数型 |
-128 〜 127 |
__int16 |
2&npsb;Byte |
拡張整数型 |
-32768 〜 32767 |
__int32 |
4&npsb;Byte |
拡張整数型 |
-2147483648 〜 2147483647 |
__int64 |
8&npsb;Byte |
拡張整数型 |
-9223372036854775808 〜 9223372036854775807 |
参照
| 前後のTips
データと範囲
| |