#include <stdio.h>
int main(){
int *a = {1,2,3,4,5};
printf("a:%x &a:%x\n",a,&a);
return 0;
}
I compiled this program with GCC.
The output of a
is 1
, and the output of &a
is an address.
What GCC did to int *a = {1,2,3,4,5}
? Did GCC treat it as an array or a pointer that points to an array or something else?