Strictly speaking, the answer is that the behavior is undefined.
&a
is the address of the array. Adding 1
to an address (pointer value) advances it by the size of the type that it points to. But pointer arithmetic is valid only when the result points to an element of the same array as the original pointer, or just past the end of it. (For purposes of pointer arithmetic, a single object is treated as an array of one element.)
If you assume a certain "well-behaved" memory model, with a single linear monolithic addressing space and addresses sensibly related to integers, then given your assumptions (&a
is 100, sizeof (int) == 4
), then yes, the result of &a + 4
would be 420
. More precisely, since 420
is an integer, not a pointer, it would be (int(*)[10])420
-- again, assuming conversions between pointers and integers are particularly well behaved.