C语言中char、short、int、long各占多少字节

1byte = 8bit    一个字节占8个二进制位

32位机中,

char:    1个字节

short:   2个字节

int:       4个字节

long:    4个字节

64位机中,

char:    1个字节

short:   2个字节

int:       4个字节

long:    8个字节

原文:https://blog.csdn.net/weixin_40997360/article/details/79948968 
 

你可能感兴趣的:(C)