The variable name is a pointer
A variable name is an alias to the address of where the data is stored in the memory. It act as an entry point.
You can declare a variable and print the address of it using %p format in C language.
int val;
printf("address: %p\n", &val); // address: 0x7ff7b5611bd8
Same principle applies to the array. The name of the array itself points to the address of the first element in the array. We can prove this by comparing the value of arr[0] and *(arr+0) or *arr.
int arr[] = {1, 2, 3, 4, 5};
// 0x7ff7b3c3fbe0 == 0x7ff7b3c3fbe0 == 0x7ff7b3c3fbe0
printf("%p == %p == %p\n", &(arr[0]), (arr+0), arr);
// 1 == 1 == 1
printf("%d == %d == %d\n", arr[0], *(arr+0), *arr);
This is how index operator ([]) is calculating the offset. When we perform arr + 2, we’re not adding the integer value 2 to the array. We are offsetting by two positions from arr, giving us the location of a 3rd element.
int arr[] = {1, 2, 3, 4, 5};
printf("arr[0] = %d\n", *arr); // 1
printf("arr[1] = %d\n", *(arr+1)); // 2
printf("arr[2] = %d\n", *(arr+2)); // 3