c:기본_자료형

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
c:기본_자료형 [2022/01/16 20:37] jonghoonc:기본_자료형 [2026/03/24 16:38] (current) – removed admin
Line 1: Line 1:
-다음은 추가 라이브러리 필요없이 바로 쓸 수 있는 자료형이다. 
-각 자료형의 크기는 64bit ubuntu 20.04 LTS 버전의 g++ 9.3.0버전 기준으로 작성되었다. 자료형마다 할당되는 크기는 OS와 컴파일러에 따라 차이가 있을 수 있다. 
  
-^ 자료 유형 구분 ^ 자료형 ^ 크기 ^ 범위 ^ 비고 ^ 
-| 자료 유형 없음 | void | - | - | - | 
-| 정수형 | bool | 1 byte | $0 \sim 1$ | true or false | 
-| ::: | char(int8_t) | 1 byte | $-2^7 \sim 2^7-1$ | - | 
-| ::: | unsigned char(uint8_t) | 1 byte | $0 \sim 2^8-1$ | - | 
-| ::: | short(int16_t) | 2 byte | $-2^{15} \sim 2^{15}-1$ | - | 
-| ::: | unsigned short(uint16_t) | 2 byte | $0 \sim 2^{16}-1$ | - | 
-| ::: | int(int32_t) | 4 byte | $-2^{31} \sim 2^{31}-1$ | - | 
-| ::: | unsigned int(uint32_t) | 4 byte | $0 \sim 2^{32}-1$ | - | 
-| ::: | long(long int, long long, long long int, int64_t) | 8 byte | -2^{63} \sim 2^{63} -1 | - | 
-| ::: | unsigned long(unsigned long int, unsigned long long, unsigned long long int, uint64_t) | 8 byte | 0 \sim 2^{64}-1| - | 
  • c/기본_자료형.1642333076.txt.gz
  • Last modified: 2023/09/05 15:46
  • (external edit)