當前位置:首頁 » 編程語言 » 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關鍵字分別求出來。

熱點內容
sql隨機函數 發布:2025-09-15 15:20:19 瀏覽:82
校園伺服器禁止設置ip 發布:2025-09-15 15:11:06 瀏覽:759
android刷回 發布:2025-09-15 14:54:24 瀏覽:566
n後問題演算法 發布:2025-09-15 14:38:17 瀏覽:378
壓縮機絕緣 發布:2025-09-15 14:31:10 瀏覽:528
python大數據與量化 發布:2025-09-15 13:51:49 瀏覽:91
築業資料軟體加密鎖 發布:2025-09-15 13:28:41 瀏覽:510
如何看智能電視配置 發布:2025-09-15 12:40:07 瀏覽:224
中學地質災害演練腳本 發布:2025-09-15 12:35:07 瀏覽:931
定時觸發源碼 發布:2025-09-15 12:22:05 瀏覽:992