#include <stdio.h>
int main(){
int array[] = {1,2,3};
printf("L00: array[0]=%d \n",array[0]);
printf("L01: array[1]=%d \n",array[1]);
printf("L02: array[2]=%d \n",array[2]);
printf("L03: &array[0]=%p \n",&array[0]);
printf("L04: &array[1]=%p \n",&array[1]);
printf("L05: &array[2]=%p \n",&array[2]);
printf("L06: array=%p \n",array);
printf("L07: &array=%p \n",&array);
return 0;
}
In this program, L03,L06, and L07 show (&array
,array
, and &array[0]
, respectively) the same memory address.
So I'm curious about the location of the "array" as a variable in RAM.
If there is no location of "array" in RAM, where is it?