C語言的變量類型

整數類型 所占位數 數值的範圍
int 16 -32768~32767
short 16 -32768~32767
long 32 -2147483648~2147483647
unsigned int 16 0~65535
unsigned short 16 0~65535
unsigned long 32 0~4294967295
浮點數類型
float 32 3.4e-38~3.4e38
double 64 1.7e-308~1.7e308
字符類型
char 8 -128~127
unsigned char 8 0~255

發表迴響

在下方填入你的資料或按右方圖示以社群網站登入:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / 變更 )

Twitter picture

You are commenting using your Twitter account. Log Out / 變更 )

Facebook照片

You are commenting using your Facebook account. Log Out / 變更 )

Google+ photo

You are commenting using your Google+ account. Log Out / 變更 )

連結到 %s