The behavior is always undefined. You cannot store memory in NULL.
Pointer arithmetic is valid only in arrays, and you can set the pointer to the index of the array or one location after the final element. Note. I'm talking about setting a pointer here, not dereferencing it.
You can also set a pointer to a scalar and a scalar one after it.
.