Homework7
这个作业属于哪个课程:https://edu.cnblogs.com/campus/fzu/2026gjyycxsj
这个作业要求在哪里: https://edu.cnblogs.com/campus/fzu/2026gjyycxsj/homework/16753
学号:0102600103
姓名:林子珩
1

2

3

4
int a
An integer variable named "a".
int *a
The pointer which stores the position of "a".
int **a
The level-2 pointer which stores the position of *a.
int a[10]
An array. It contains 10 elements and is named "a".
int (*a)[10]
An pointer. It stores the position of array "a". And in default, it points to the first element.
5


6

7
printf("%d\n",sizeof(a));
The bytes that the whole array takes.
printf("%d\n",sizeof(a[0][0]));
The bytes that the first element takes.
printf("%d\n",sizeof(a[0]));
The bytes that the first row takes.
printf("%d\n",sizeof(a[0]+1));
The bytes that the pointer takes.
printf("%d\n",sizeof(*(a[0]+1)));
The bytes that the second element takes.
printf("%d\n",sizeof(a+1));
The bytes that the row pointer takes.
printf("%d\n",sizeof(*(a+1)));
The bytes that the second row takes.
printf("%d\n",sizeof(&a[0]+1));
The bytes that the row pointer takes.
printf("%d\n",sizeof(*(&a[0]+1)));
The bytes that the second row takes.
printf("%d\n",sizeof(*a));
The bytes that the first row takes.
printf("%d\n",sizeof(a[3]));
The bytes that the fourth row takes.
8


浙公网安备 33010602011771号