64位作業系統中各型別指標位元組?

64位作業系統中各型別指標位元組?熱鬧天空3C2022-01-02 13:09:15

long型別和指標型別長度為8個位元組,string型別是40個位元組,其他型別與32位系統的位元組數一樣。其他型別如下:

1:整形

int 4位元組

long int 4位元組

short 2位元組

unsigned int 4位元組

unsigned long int 4位元組

unsigned short 2位元組

2:字元型

char 1位元組

unsigned char 1位元組

3:浮點型

float 4位元組

double 8位元組

long double 8位元組

unsigned long double 8位元組

unsigned double 4位元組

4:字串型

string 28位元組

5:指標型別

所有型別的指標都是4位元組

6:函式

除了void型,其他都函式佔有的位元組數等於函式的返回型別所佔有的位元組數,與函式體內部無關。