c 和 c++

yum安装

yum install gcc
yum install gcc-c++ libstdc++-deve

基本数据类型大小(单位:字节(byte))

sizof(char)=1 
sizof(int)=4 
sizof(short int)=2 
sizof(long int)=8 
sizof(long)=8 
sizof(float)=4 

sizof(uint)=4 
sizof(uint16_t)=2 
sizof(uint32_t)=4 
sizof(uint64_t)=8 
sizof(uint8_t)=1 
sizof(stru_empty)=1 
sizof(stru1)=12 

sizof(stru2)=8 

sizof(stru3)=12 

sizof(stru4)=8 

sizof(stru5)=16 

sizof(stru6)=20 
sizof(stru6.tt)=8 
the address of stru6.i=-1112611352 
the address of stru6.a=-1112611340 

sizof(stru7)=12 
sizof(stru7)=1 
the address of stru7.i=-1112611368 
the address of stru7.a=-1112611366 

sizof(ar)=20 
sizof(ar.f)=4 
sizof(ar.arr)=12 
支付宝打赏 微信打赏

来杯咖啡~

文章导航