Operations on a pointer (like incrementing, adding, etc) are generally only valid if both the initial value of the pointer and the result point to elements of the same array (or to one past the last element). Otherwise the result is undefined. There are various clauses in the standard for the various operators saying this, including for incrementing and adding. (There are a couple of exceptions like adding zero to NULL or subtracting zero from NULL being valid, but that doesn't apply here).