很多基礎就不打了,只打一些重點
設環境 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]