자료형 C

기본 자료형의 종류(간단히 정리)
 
구분자료형크기
문자형  char  1 byte
  unsigned char  1 byte
정수형  int  4 byte
  short int  2 byte
  unsigned int  4 byte
  long  4 byte
  unsigned long  4 byte
실수형  float  4 byte
  double  8 byte

기본 자료형의 종류 (상세 정리)
구분자료형크기범위
문자형char1 byte-128 ~ 127
unsigned char1 byte0 ~ 255
정수형__int81 byte-128 ~ 127
__int162 byte-32,768 to 32,767
unsigned int2 byte-32,768 to 32,767
(signed) short (int)2 byte-32,768 to 32,767
unsigned short (int)2 byte0 ~ 65,535
__int324 byte-2,147,483,648 ~ 2,147,483,647
(signed) int4 byte-2,147,483,648 ~ 2,147,483,647
unsigned int4 byte0 ~ 4,294,967,295
(signed) long (int)4 byte-2,147,483,648 ~ 2,147,483,647
unsigned long (ing)4 byte-2,147,483,648 ~ 2,147,483,647
__int648 byte-9,223,372,036,854,775,808 ~ 9,223,372,036,854,775,807
실수형float4 byte3.4E +/- 38 (7 digits)
double8 byte1.7E +/- 308 (15 digits)
long double8 byte1.2E +/- 4932 (19 digits)


short int (short, signed short int) 2byte -32,768 ~ 32,767
unsigned short int (unsigned short) 2byte 0 ~ 65,535
int (signed, signed int) 2byte -32,768 ~ 32,767
unsigned int (unsigned) 2byte 0 ~ 65,535
long int (long, signed long int) 4byte -2,147,483,648 ~ 2,147,483,647
unsigned long int (unsigned long) 4byte 0 ~ 4,294,967,295

트랙백

이 글과 관련된 글 쓰기 (트랙백 보내기)
TrackbackURL : http://dancal.egloos.com/tb/10056576 [도움말]

덧글

덧글 입력 영역