1、统计数组:
int a[10];
char b[10];
cout << sizeof(a) << endl;//40
cout << sizeof(b) << endl;//10
2、统计指针:
char *str = "hello fzz";
int a = 9;
int *i = &a;
double d = 1.00;
double *ptrD = &d;
cout << sizeof(str) << endl;//4
cout << sizeof(a) << endl;//4
cout << sizeof(i) << endl;//4
cout << sizeof(d) << endl;//8
cout << sizeof(ptrD) << endl;//4