Same goes for arrays, `int *x[30]` just says that `*x[30]` is an `int` (well, technically it's out of bounds by 1), thereby we're declaring an array of 30 int-pointers.
Of course, that hasn't been entirely true since function declaration changed with ANSI C in the late 80s or so.
When using that variable with the allowed operators, the resultant type of the expression is determined by the declaration:
pa; // int *[10]
pa[x]; // int *
*pa[x]; // intAnd unary operators on an identifier are a different thing, though I similarly don’t think adding one at the left, another at the right is a good thing. But I have trouble with the declaration site as well.
It’s getting out of reach of my knowledge, but I believe C’s grammar being hacky is in part due to that as well.
I didn’t find exactly what I was looking for but here is some more on it: https://pdos.csail.mit.edu/archive/l/c/roskind.html
int a, *b, (*c)(int); int * a, b;
Here it sticks to a.Then typedef comes along and ruins everything:
typedef int * pint;
pint c, d;