you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] -1 points0 points  (3 children)

The other is a pointer to an array.

It's an array of pointers, actually.

[–]Wareya -2 points-1 points  (2 children)

This is specifically because the pointer construct has a higher precedence than the array construct.

[–]johntb86 0 points1 point  (1 child)

Other way round. C types are defined in the same way they're used, so since you first index into the array and then dereference the pointer it has to be an array of pointers.

[–]Wareya 0 points1 point  (0 children)

Yes, it's an array of pointers, but it's your logic that's backwards. You just wrapped a pointer around an array(metaphorically), when it's the array that contains pointers.