How does de-referencing work for pointer to an array?

前端 未结 5 1516
陌清茗
陌清茗 2021-01-24 09:53

Pointer to array of elements when dereferenced return an address. Since it is holding the address of the first element of the array, dereferencing it should return a value.

5条回答
  •  忘掉有多难
    2021-01-24 10:42

    Arrays are pointers. Arrays are not pointers, see the comments below

    A pointer to an array is a pointer, pointing at a pointer. Try de-referencing twice over, that should yeild a value.

提交回复
热议问题