C's index[arr] notation
5 points| leegao | 15 years ago
arr[index] is equivalent to (arr + index), which by the commutative property of addition is equivalent to (index + arr) = index[arr].
Mind = blown
5 points| leegao | 15 years ago
arr[index] is equivalent to (arr + index), which by the commutative property of addition is equivalent to (index + arr) = index[arr].
Mind = blown
marcomonteiro|15 years ago
arr[index] == arr + (n * size_of(type)) == (n * size_of(type)) + *arr
SamReidHughes|15 years ago
C pointer arithmetic already accounts for object sizes.
And it's sizeof, not size_of. And
is completely different from And it's a series of "values".unknown|15 years ago
[deleted]
unknown|15 years ago
[deleted]