Pointers are a difficult topic for sure, but I have come across this snippet and I just can't figure out what the p[-1] is:
#include <stdio.h>
int main(void) {
int t[10] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 }, *p = t;
p += 2;
p += p[-1];
printf("%d",*p);
return 0;
}
t[2]). Now you access one address before the one it is pointing to, resulting in it pointing to the address containing the2(ort[1]).