I was revisiting pointers when I had this doubt.
int *ptr; int arr[5] = {10,20,30,40,50}; ptr = &arr[0];
Now printf(\"Value: %d\"
printf(\"Value: %d\"
When you do * ptr++, you are actually doing * (ptr++), so the pointer get incremented, not the variable it points to
* ptr++
* (ptr++)
When ++ *ptr, it's actually ++(* ptr), so it increments the value returned by the pointer
++ *ptr
++(* ptr)