更多关于编程语言, 数据库,算法等精品内容, 请访问 我的个人博客 huqijun.org
int main()
{
cout<<" the size of int :"<<sizeof(int)<<endl;
cout<<" the size of short :"<<sizeof(short)<<endl;
cout<<" the size of long :"<<sizeof(long)<<endl;
cout<<" the size of float :"<<sizeof(float)<<endl;
cout<<" the size of double :"<<sizeof(double)<<endl;
cout<<" the size of long double :"<<sizeof(long double)<<endl;
cout<<" the size of char :"<<sizeof(char)<<endl;
cout<<" the size of wchar_t :"<<sizeof(wchar_t)<<endl;
cout<<" the size of bool :" <<sizeof(bool)<<endl;
return 0;
}
=================================================
受不了, CSDN竟然传个图都不行
只能手动播报结果了:
4
2
4
4
8
12
1
2
1
更多关于编程语言, 数据库,算法等精品内容, 请访问 我的个人博客 huqijun.org
个人原创内容, 转载请注明来源!