Dereferences the value of p, then increments it
int a[] = {1, 2, 3, 4};
int *p = a
int x = *p++; // x = 1, p then point to 2
*--pdereferences then increments
Increments the pointer then dereferences it
int a[] = {1, 2, 3, 4};
int *p = a
int x = *++p; // x = 2, p point to 2
*--pdecrements then dereferences
In the context of pointers to pointers, like argv[].
++p increment the pointer*++p dereferences the pointer, accessing the pointer it points to(*++p)[i] access the ith element of the array// by calling the program with: ./program -n hello
char c = (*++argv)[0] // move the pointer to the second command line argument '-n', and accesses its first char '-'
Equivalent to
**++p
In the context of pointers to pointers, like argv[].
p[i] get the ith pointer of the pointers array ([] is evaluated before *++)++p[i] increments the ith pointer*++p[i] dereferences the ith element of the array// by calling the program with: ./program -n hello
char c = *++argv[1] // access the argv[1] command line argument '-n' as a pointer, increment the pointer (now points at 'n', because first it was on '-'), access the value 'n'