20240000 嵌入式八股

数据所在内存大小
double 8
sizeof(指针) 4 如:int* 4,char *4,double * 4。。。
char ch[]={“zhang”};
sizeof(ch)=6
1 | 1 void Func(char a[100]) |
特别注意,类和结构体的大小(内存对齐和填充的概念),
1 | 1 struct { |
sizeof(str_1)=4+4+4=12;
sizeof(str_2)=4+4=8;
union 联合具体情况而定。
Comments
Comment plugin failed to load
Loading comment plugin