This is one pretty good at link here about Pointer Arithmetic
For example:
Pointer and array
Formula for computing the address of ptr + i where ptr has type T *. then the formula for the address is:
addr( ptr + i ) = addr( ptr ) + [ sizeof( T ) * i ]
For for type of int on 32bit platform, addr(ptr+i) = addr(ptr)+4*i;
Subtraction
We can also compute ptr - i. For example, suppose we have an int array called arr.
int arr[ 10 ] ;
int * p1, * p2 ;
p1 = arr + 3 ; // p1 == & arr[ 3 ]
p2 = p1 - 2 ; // p1 == & arr[ 1 ]