當前位置:首頁 » 編程語言 » c語言8位元組

c語言8位元組

發布時間: 2025-01-13 02:38:51

㈠ C語言中 int long float double分別佔用了多少個位元組

char/signed char/unsigned char: 1個位元組;
char*(即指針變數):
2個位元組(16位編譯器)
4個位元組(32位編譯器)
8個位元組(64位編譯器)
short int: 2個位元組
int/unsigned int:
2個位元組(16位編譯器)
4個位元組(32/64位編譯器)
long int: 4個位元組
float: 4個位元組
double: 8個位元組
long double: 8/10/12/16?
long/unsigned long:
4個位元組(16/32位編譯器)
8個位元組(64位編譯器)
long long: 8個位元組
string: 字元個數+1

上面的只是參考,具體的長度你可以在你的編譯器中使用sizeof關鍵字分別求出來。

熱點內容
安卓手機投屏為什麼只能本地視頻 發布:2025-07-15 04:51:19 瀏覽:537
棧的存儲結構 發布:2025-07-15 04:51:16 瀏覽:233
現在天龍八部腳本 發布:2025-07-15 04:45:35 瀏覽:332
優酷緩存後怎麼豎屏觀看 發布:2025-07-15 04:44:09 瀏覽:247
蟻周演算法 發布:2025-07-15 04:34:28 瀏覽:600
電腦伺服器名稱寫什麼 發布:2025-07-15 04:29:53 瀏覽:430
安卓編譯打包 發布:2025-07-15 04:24:20 瀏覽:169
bat編譯器 發布:2025-07-15 04:18:07 瀏覽:54
中興伺服器登錄地址 發布:2025-07-15 04:02:47 瀏覽:988
手提箱怎麼改密碼 發布:2025-07-15 03:55:47 瀏覽:219