练习题一、char类型占几字节?char*类型占几字节?int*****占几字节?
char类型占1字节,char类型占4字节,int*****占4字节。
练习题二、char** arr[10] 占多少个字节?
char** arr[10] 占40字节
练习题三、
自定义结构体如下:
struct Student
{
int x;
int y;
};
第一步:
```c
Student**** s;
s = (Student****)100;
s++; //s的值是多少?
s = s+2; //s的值是多少?
s = s-3; //s的值是多少?
S++等于100+14=104
s =s+2 等于104+24=112
s =s-3 等于112-2*3=106
第二步:
Student**** s1;
Student**** s2;
int x;
s1 = (Student****)200;
s2 = (Student****)100;
x = s1-s2; //x的值是多少?
x = s1-s2等于(200-100)/4=25