3 ms·
No, it's actually defined to be the same. The pointer arithmetic in C follows your intuitive understanding of array indexing. #include <stdio.h> i
by heinrich5991 7y ago
No, it's actually defined to be the same. The pointer arithmetic in C follows your intuitive understanding of array indexing.
#include <stdio.h>
int main() {
int array[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16};
printf("%d %d\n", array[4], *(array + 4));
return 0;
}
prints "4 4".