7 pointer array reference

Article Directory

7.7 Pointer array

  • Definition of one-dimensional pointer array

Insert picture description here

  • The array name in the pointer array is also a pointer variable, which is a pointer to a pointer

Insert picture description here

  • p is an array of pointers, each element of it is a pointer data (value is the address),
  • The first value of the array p is the address of the variable a.
  • Elements in the pointer array can be referenced using pointers to pointers. E.g

Insert picture description here

  • * Means p is a pointer variable,
  • * (* p) indicates a pointer to a pointer,
  • * Combinability is from right to left,
  • int * (* p) can be written as int ** p

Insert picture description here

Insert picture description here

Insert picture description here

Published 589 original articles · 300 praises · 80,000 + views

Guess you like

Origin blog.csdn.net/zhoutianzi12/article/details/105618637