Pointers Arithmetic

Pointer and arrays are closely related in C.

Given a pointer to one element of an array, it is simple to obtain a pointer to any other element.

Suppose pointer p refers to array[i].

Then, p+j refers to array[i+j].

Similarly, p-j refers to array[i-j].

The above is sometimes termed pointer arithmetic.

Index