#include <iostream>
#include <cstdio>
#include <cmath>
#include <algorithm>
using namespace std;
struct s
{ int x:3;
int y:4;
int z:5;
double a;
};
struct a {
int x:4;
int y:5;
int z:6;
int c;
};
int main()
{
a d;
cout<<&d<<endl;
d.z = d.x + d.y;
printf("%d %d %d %d\n",d.x, d.y, d.z, sizeof(d));
cout << sizeof(s) << endl;
cout << sizeof(a) << endl;
return 0;
}
创新工场校招:
//http://blog.csdn.net/huangxy10/article/details/8026464
内存相关(C/C++)基础知识
最新推荐文章于 2022-07-19 22:31:00 发布