Pointers can be operated on as a data type, using addition and subtraction.

Incrementing a Pointer

Incrementing a pointer makes it point to the next possible location in memory holding its data type, as opposed to incrementing it by 1, as a regular integer would work. For example,

int* p;
int x = 3; //address 1000
p = &x;
 
p++;
printf(p); //Output: 1004

The same principle follows for decrementing a pointer.

Adding and Subtracting Integers to a Pointer

The above also works in effectively the same way when adding an integer to a pointer.

int* p;
int x = 3; //address 1000
p = &x;
 
p + 2;
printf(p); //Output: 1008