one basic type + zero or more derived types
unsigned long long,
*: pointer to … - always on the left side
: array of … - always on the left side
(): function returning … - always on the left side
() have higher precedence than
There is a “right-left” rule. I think the rule is based on the precedence.
C pointer to array/array of pointers disambiguation also mentioned *”go right when you can, go left when you must”*.
Since we can read complex declaration by applying the rule mentioned before, we also can find error in declaration with the knowledge of what is legal in C.
Some illegal declarations,
// array of functions?
foo is array of array of 8 pointer to pointer to function returning pointer to array of pointer to char.
- The key is the “right-left” rule.
- Be aware of what is legal in C.
- 数组指针，指针数组。。。Well, the Chinese description is really ambiguous.