Communities for your favorite technologies. Explore all Collectives
Stack Overflow for Teams is now called Stack Internal. Bring the best of human thought and AI automation together at your work.
Bring the best of human thought and AI automation together at your work. Learn more
Find centralized, trusted content and collaborate around the technologies you use most.
Stack Internal
Knowledge at work
Bring the best of human thought and AI automation together at your work.
int *a[5];
Is this an array of 5 pointers or a pointer pointing to an array of size 5?
int (*a)[5];
For future reference, use cdecl.org.
Entering int *a[5], the output is...
int *a[5]
declare a as array 5 of pointer to int
Thus, a is an array of 5 int *. :-)
a
int *
Add a comment
C gibberish ↔ English
It's an array of 5 pointers to int.
int
You might find the right-left rule helpful.
that's an array of pointers. that's because int * is a type, unlike the impression most people get that the type is int and the name is *a .
*a
Required, but never shown
By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.
Start asking to get answers
Find the answer to your question by asking.
Explore related questions
See similar questions with these tags.
int (*a)[5];