很多基础就不打了,只打一些重点
设环境 x86_32
char* a -> pointer to char
int* b -> pointer to int
int c[4] -> array of int
int (*d)[4] -> pointer to an array of int
sizeof(a) = sizeof(b) = 4
sizeof(char) = 1
sizeof(int) = 4
sizeof(c) = 4 * sizeof(int) = 16
sizeof(d) = sizeof(void*) = 4
//设 a = 0x0,b = 0x0 , &c=0x0
a++ 后为0x0 + sizeof(char) = 0x1
b++ 后为0x0 + sizeof(int) = 0x4
c 实质上是 the address of the first element of an array
&c 是 a pointer to [an array of int]
int *p = c 会被隐型转成 int *p = &c[0]
int *p = &c 因为两边型态不同,所以被强制转成 int*
c = &c = 0x0 只是型态不同
c 是 int *
&c 是 int (*)[4]