tags:
- computer-science
- programming
- c
- social-media
- stack-overflow
source: https://stackoverflow.com/questions/4622461/difference-between-pointer-index-and-pointer
created: 2024-12-10
published: 2011-01-07
int first = *(pointer + 0);
int second = pointer[1];
int third = 2[pointer];
Is there a difference between the different syntax for accessing an array element with the index?
No, there's no difference between the different syntax for accessing an array element with the index.
Why isn't there a difference between the different syntax for accessing an array element with the index?
There isn't a difference between the different syntax for accessing an array element with the index because it is based on addition, which is an associative and commutative operation.
...