#include <stdio.h>
int main() {
int x[5];
printf("%p\n", x);
printf("%p\n", x+1);
printf("%p\n", &x);
printf("%p\n", &x+1);
return 0;
}
Since none of you use C compilers I know there will be no risk of cheating.
Name:
Anonymous2011-10-20 0:57
>>31
Yes, but I mean is &x+1 really guaranteed to point immediately after the end of x? Isn't it allowed for there to be padding after x to allow x+1 to be aligned? Is it even guaranteed that x+1 won't be temporarily stored somewhere totally different in memory, separate from the stack?