When I compiled the following code, it shows that y and the beginning of the array are 60 units apart. But according to my calculation, it should have been 4 * 10 (for the array) + 4 (for k) + 4 (for y) = 48. Also array[12] = 17 was assigned to element 12, since there's no element 12, the implementation should have gone to y and overwrite y with 17. Yet the console printed y = 10 instead... im really confused... Please help!
#include <stdio.h>
int main(void) {
int x = 42;
int y = 10;
int k = 10;
int array[10];
array[12] = 17;
printf("array starts at %d\n", &array[0]);
printf("x has the value %d\n", x);
printf("x is stored in location %d\n", &x);
printf("y has the value %d\n", y);
printf("y is stored in location %d\n", &y);
}