The C standard says there is a pointer to "one past the last element of the array object" , which is valid for purposes of pointer arithmetic (you can do pointer arithmetic and get expected results).
My question is, what exactly is meant by "array object", so that "one past" pointer is valid for arithmetic? Something declared as array of elements of a type, is an array object.
What else?
Is pointer to character after the area returned from malloc(), (edit) cast to char* , guaranteed to be valid for arithmetic?
Is pointer to character after the area returned from mmap(), (edit) cast to char* , guaranteed to be valid for arithmetic?
I can't find any confirmation in man pages of these functions.