>we are taking 8 bytes of memory , then we are giving to 4 bytes of it the
>value 2 and the next 4 bytes of it the value 3.
No. An int doesn't have to be 4 bytes. The statement is otherwise correct, but I would word it like this: Enough memory is set aside for two integers. The first integer is given the value 2 and the second integer is given the value 3.
>then "arr" is converted to a pointer to the first element.
No, the array name is only converted to a pointer in value context. That is, when you try to use it. This is a declaration, not a use. If you try to print the first item, that's value context and the array name is converted to a pointer:
/* arr is not converted to a pointer */
int arr[2] = {2, 3};
/* arr is converted to a pointer */
printf ( "%d\n", arr[0] );
>What about "arr" location in memory
All of the following can and often do produce the same address:
int arr[2] = {2, 3};
/* Address of the first element */
printf ( "%p\n", (void*)&arr[0] );
/* Address of the array converted to a pointer */
printf ( "%p\n", (void*)arr );
/* Address of the array as an object */
printf ( "%p\n", (void*)&arr );
This doesn't mean they're the same thing though. There's a difference in type between the address of the first element and the address of the array. The address of the first element iis a pointer to int and the address of the array is a pointer to an array of int. There's no "pointing to itself" going on.