Martin said:
I'm not sure where I'm seeing the 'pointer to array' as queried by the
OP. You're talking about pointers to arrays of pointers, similar to
argv.
Strictly speaking, argv is not a pointer to arrays of pointers. It
doesn't point to an array; it points to the first element of an array.
It's an important distinction, since a pointer to an array and a
pointer to the first element of an array are two distinct thingsm,
both potentially useful.
Pointers to arrays (at least pointer values if not pointer objects)
show up in multidimensional arrays. For example:
int arr[10][20];
...
arr[x][y];
arr is of type array 10 of array 20 of int, which decays to pointer to
array 10 of int (there's your pointer to an array).
arr[x] is of type array 10 of int, which decays to pointer to int.
arr[x][y] is of type int.
In most cases, though, a pointer to the first element of an array
(along with the separately remembered length of the array) is more
useful and flexible than a pointer to the whole array. You need an
element pointer for indexing (which after all is what arrays are for),
and the whole-array pointer implicitly contains the array's length
(which must be constant) in its type.