char a[] = "ABC";
char *p = a; // p points to the first character in the array.
// "ABC"
// ^
// p
print(++*p); // Same as: ++(*p)
// The character that p points to is incremented (i.e. The
// A is turned into a B).
// "BBC"
// ^
// p
print(*p++); // Same as: *(p++)
// The pointer p is incremented so that it points to the
// second character in the array. The expression (p++)
// returns the old value of p (because post-increment was
// used) before it was incremented so the value that is
// printed is actually the first character in the array. It
// doesn't matter though because the first and second
// character are equal.
// "BBC"
// ^
// p
print(*p); // Prints the character that p points to.
// "BBC"
// ^
// p
This code below, prints 4 3 2 2 2 and when I tried to use the same explanation you said up there i didnt get the same values :c what's new in this one?