|
資料型態 |
位元組數/位元數 |
數值範圍 |
|
整數 |
int
signed
signed int |
4/32 |
-2,147,483,648 ~ 2,147,483,647 |
unsigned
unsigned int |
4/32 |
0 ~ 4,294,967,295 |
short
short int |
2/16 |
-32,768 ~ 32767 |
unsigned short
unsigned short int |
2/16 |
0 ~ 65,535 |
long*1
long int
signed long
signed long int |
4/32 |
-2,147,483,648 ~ 2,147,483,647 |
unsigned long
unsigned long int |
4/32 |
0 ~ 4,294,967,295 |
|
單精數 |
float |
4/32 |
±3.4×10-38 ~
±3.4×1038
有效位數 7位 |
|
倍精數 |
double
long double |
8/64 |
±1.7×10-308 ~
±1.7×10308
有效位數 15位 |
|
字元 |
char |
1/8 |
0 ~ 255 (ASCII碼) |