Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
int *a[5];
这是一个由 5 个指针组成的数组还是一个指向大小为 5 的数组的指针?
为了将来参考,请使用cdecl.org。
输入int *a[5],输出是...
int *a[5]
将 a 声明为指向 int 的指针的数组 5
因此,a是一个 5 的数组int *。:-)
a
int *
它是一个由 5 个指针组成的数组int。
int
您可能会发现左右规则很有帮助。
那是一个指针数组。那是因为int *is 一个类型,不像大多数人得到的印象是 type isint和 name is *a。
*a