|
|
|
|
|
by colanderman
5358 days ago
|
|
> I incorrectly thought that what I remembered about pointer arithmetic would apply here. 1 * sizeof(int) = 0x04, so I guessed 0x7fffdfbf7f04. Your pointer arithmetic was correct. What you missed was that &x is a pointer to an array of five ints (so, sizeof(int[5])), not a single int. I on the other hand didn't realize sizeof(int) is not necessarily 8 on 64-bit machines. You learn something new every day... |
|