If we take the following code:
int height = 10;
int width = 5;
printf(
"The memory address of height is: %p\n"
"The memory address of width is: %p\n",
&height, &width
);
I get the following prints:
The memory address of height is: 0x7ffeed809a78
The memory address of width is: 0x7ffeed809a74
I was expecting the width to be at location 0x7ffee8843a7c
. In other words it's doing &height - 1
instead of &height + 1
. Why is that so?