티스토리 뷰
데이터 형식 범위, 데이터 크기
기본 제공 형식의 크기
형식 이름Type Name | 바이트Bytes | 기타 이름Other Names | 값 범위Range of Values |
---|---|---|---|
intint | 4 | signedsigned | –2,147,483,648 ~ 2,147,483,647-2,147,483,648 to 2,147,483,647 |
unsigned intunsigned int | 4 | unsignedunsigned | 0 ~ 4,294,967,2950 to 4,294,967,295 |
__int8__int8 | 1 | charchar | -128 ~ 127-128 to 127 |
unsigned __int8unsigned __int8 | 1 | unsigned charunsigned char | 0 ~ 2550 to 255 |
__int16__int16 | 2 | short, short int, signed short intshort, short int, signed short int | –32,768 ~ 32,767-32,768 to 32,767 |
unsigned __int16unsigned __int16 | 2 | unsigned short, unsigned short intunsigned short, unsigned short int | 0 ~ 65,5350 to 65,535 |
__int32__int32 | 4 | signed, signed int, intsigned, signed int, int | –2,147,483,648 ~ 2,147,483,647-2,147,483,648 to 2,147,483,647 |
unsigned __int32unsigned __int32 | 4 | unsigned, unsigned intunsigned, unsigned int | 0 ~ 4,294,967,2950 to 4,294,967,295 |
__int64__int64 | 8 | long long, signed long longlong long, signed long long | –9,223,372,036,854,775,808 ~ 9,223,372,036,854,775,807-9,223,372,036,854,775,808 to 9,223,372,036,854,775,807 |
unsigned __int64unsigned __int64 | 8 | 부호 없는 long longunsigned long long | 0 ~ 18,446,744,073,709,551,6150 to 18,446,744,073,709,551,615 |
boolbool | 1 | 없음none | false 또는 truefalse or true |
charchar | 1 | 없음none | 기본적으로-128 ~ 127-128 to 127 by default /J를 사용하여 컴파일된 경우 0~2550 to 255 when compiled by using /J |
signed) charsigned char | 1 | 없음none | -128 ~ 127-128 to 127 |
unsigned charunsigned char | 1 | 없음none | 0 ~ 2550 to 255 |
shortshort | 2 | short int, signed short intshort int, signed short int | –32,768 ~ 32,767-32,768 to 32,767 |
unsigned shortunsigned short | 2 | unsigned short intunsigned short int | 0 ~ 65,5350 to 65,535 |
longlong | 4 | long int, 부호 있는 long intlong int, signed long int | –2,147,483,648 ~ 2,147,483,647-2,147,483,648 to 2,147,483,647 |
unsigned longunsigned long | 4 | unsigned long intunsigned long int | 0 ~ 4,294,967,2950 to 4,294,967,295 |
long longlong long | 8 | 없음 (하지만 __int64와 동일)none (but equivalent to __int64) | –9,223,372,036,854,775,808 ~ 9,223,372,036,854,775,807-9,223,372,036,854,775,808 to 9,223,372,036,854,775,807 |
부호 없는 long longunsigned long long | 8 | 없음 (하지만 unsigned __int64와 동일)none (but equivalent to unsigned __int64) | 0 ~ 18,446,744,073,709,551,6150 to 18,446,744,073,709,551,615 |
enumenum | variesvaries | 없음none | |
floatfloat | 4 | 없음none | 3.4E+/-38(7개의 자릿수)3.4E +/- 38 (7 digits) |
doubledouble | 8 | 없음none | 1.7E+/-308(15개의 자릿수)1.7E +/- 308 (15 digits) |
long doublelong double | double 과 동일same as double | 없음none | Double 과 동일Same as double |
wchar_twchar_t | 2 | __wchar_t__wchar_t | 0 ~ 65,535 |