The ++ and -- are the Increment and Decrement Operators.
So n++; can be used instead of n = n + 1;
n--; can be used instead of n = n - 1;
The pre- or post- position, says when the increment/decrement is applied.
1 2 3
X= 1;
Y = ++X; // X is incremented and then the new value of X is assigned to Y
Z = X++; //Z is assigned the current value of X and then X is incremented.
In your example you are incrementing/decrementing the address that the pointer points to:
Well, you made it very illustrative, thank you for the effort, is nice!
Actually I just couldn't understand how can that arithmetic be made on something, which is normally a pointer to character. Well, why not. But was strange at first.
PS:
oh, I see this message board has pretty much more power than plaintext! Only, it shows dark letters on dark background for reply window as in my case.. Do you know someone who should I inform about such a problem? There are many sites, where it is not like that.
It will fail.
Copy the pointer if you want to iterate through the characters.
The only thing you have to take care of is not to use this second pointer (sometimes called an "iterator") after freeing the first pointer.