Neither; this behavior is undefined, which usually means that it will crash the program.
The pointer you pass to delete[] must be the one that was previously returned from new[] . With no exceptions*. new[] returned a pointer to the first element of the array, so you must pass a pointer to the first element of the array to delete[] .
* The only exception is that you can pass a NULL pointer, in which case it will do nothing.
source share