The type of pointer matters not when you have to read the adress,it matters when you dereference or when you perform pointer arithmetic.(The type of pointer play role when you try to dereference or when you try or perform pointer arithmetic.)
能举一个通俗的例子解释下吗?
對於一個指標
int *i;i++;
此時i移動了4 bytes,若是char *s;s++;
指標移動 1 byte.*i
會讀取以i
位址開頭的4 bytes內容,而s
則只讀取s
為首位址的的1 byte內容.