#include<iostream>
#include<cmath>
using namespace std;
int main()
{
int a;
short b;
long long c;
unsigned short d;
float e;
double f;
bool g;
cout<<sizeof(a)<<" "<<sizeof(b)<<" "<<sizeof(c)<<" "<<sizeof(d)<<" "<<sizeof(e)<<" "<<sizeof(f)<<" "<<sizeof(g)<<endl;
}
输出结果:
4 2 8 2 4 8 1