以下是在centos_x32和centos_x64下对应的类型长度:
/*******size of types on centos_x32*****************/
size of char:1
size of int:4 [-2^32/2---2^32/2]
size of unsigned int:4 [0---2^32]
size of long :4
size of float :4
size of long long:8
size of double:8
size of long double:12
size of char * :4
/*******size of types on centos_x64*****************/
size of char:1
size of int:4
size of long :8
size of float :4
size of long long:8
size of double:8
size of long double:16
size of char * :8

本文详细介绍了在 CentOS x32 和 x64 平台上不同类型的数据大小,包括 char、int、unsigned int、long、float、long long、double、long double、char* 的具体大小,帮助开发者理解不同架构下内存布局。

被折叠的 条评论
为什么被折叠?



