當前位置:首頁 » 編程語言 » 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-10-16 08:13:40 瀏覽:406
115安卓同時下載的文件在哪裡 發布:2025-10-16 08:05:34 瀏覽:411
python拋出異常 發布:2025-10-16 07:42:12 瀏覽:368
雲伺服器可以用幾個ip 發布:2025-10-16 07:42:07 瀏覽:237
c語言讀取txt文件到數組 發布:2025-10-16 07:12:52 瀏覽:798
的訪問修飾符 發布:2025-10-16 07:00:42 瀏覽:322
shell定時腳本 發布:2025-10-16 06:59:13 瀏覽:219
java中加 發布:2025-10-16 06:54:56 瀏覽:962
fifo存儲器晶元 發布:2025-10-16 06:54:14 瀏覽:953
sql2005卸載干凈 發布:2025-10-16 05:35:19 瀏覽:855