Some says that array in c is not a pointer to the first element of the array why is array name a pointer to the first element of the array? So when you print the array in c using "printf" for example why it is showing the address of the first element instead of the array elements?
Update:
const char h[10]="Hello";
printf("%p", h);
Output: 00AFFE0C
well as one answer said said that this happens because of the %type I specified and that made sense because when I write
printf("%s", h);
OR
printf(h);
Output: Hello
here two questions rises:
1) In printf(h); why it is not decaying the array and printing the pointer value because in decaying array will be converted to pointer
2) how can I print an array of int in the same way i.e. what is the %type in printf for array of int