# include <iostream>
using namespace std;
int main()
{
cout<<"sizeof(int) "<<sizeof(int)<<endl;
cout<<"sizeof(short) "<<sizeof(short)<<endl;
cout<<"sizeof(long) "<<sizeof(long)<<endl;
cout<<"sizeof(unsigned) "<<sizeof(unsigned)<<endl;
cout<<"sizeof(unsigned short) "<<sizeof(unsigned short)<<endl;
cout<<"sizeof(unsigned long) "<<sizeof(unsigned long)<<endl;
cout<<"sizeof(unsigned char) "<<sizeof(unsigned char)<<endl;
cout<<"sizeof(float) "<<sizeof(float)<<endl;
cout<<"sizeof(double) "<<sizeof(double)<<endl;
cout<<"sizeof(long double) "<<sizeof(long double)<<endl;
}
运行结果
![](https://img-my.csdn.net/uploads/201210/16/1350376449_7381.jpg)