Pointer Arithmetic in C — a practical guide to C pointer arithmetic with clear examples you can reuse in real projects.
C Programming Tutorial Series (52/102). Prefer one article? Read the complete C programming tutorial.
Short description
Pointer arithmetic is only meaningful within the same array object.
Pointer arithmetic
int a[3] = {10, 20, 30};
int *p = a;
printf("%dn", *(p + 1)); /* 20 */