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

熱點內容
linuxnative 發布:2025-02-11 03:14:17 瀏覽:779
空調壓縮機怎麼維修 發布:2025-02-11 03:06:29 瀏覽:70
圖片合成php 發布:2025-02-11 03:01:03 瀏覽:426
安卓的操作系統是哪個國家的 發布:2025-02-11 02:51:33 瀏覽:456
單機游戲解壓後 發布:2025-02-11 02:42:14 瀏覽:18
sql21 發布:2025-02-11 02:41:29 瀏覽:281
如何買二手機安卓 發布:2025-02-11 02:25:39 瀏覽:836
為什麼伺服器要幾塊硬碟 發布:2025-02-11 02:07:32 瀏覽:829
鎖屏數字密碼忘了怎麼辦 發布:2025-02-11 02:07:31 瀏覽:820
資料庫sql怎麼保存 發布:2025-02-11 02:03:25 瀏覽:720