0

I'm not sure about the difference between *p[5] and (*p)[5]?
Please help me clarify them?
Thanks a lot!

2
Contributors
2
Replies
3
Views
8 Years
Discussion Span
Last Post by Iam3R
0

It turns out that this can be done and that
int (*p1d)[5];

is the proper declaration, i.e. p1d here is a pointer to an array of 5 integers just as it was
under the declaration using the Array type. Note that this is different from

int *p1d[5];

which would make p1d the name of an array of 5 pointers to type int.

0

which would make p1d the name of an array of 5 pointers to type int.

this one

int *p1d[5];
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.