In C programming, does the address-of operator & result in object’s first address?
For example:
int a[2] = {10, 20};
int* arrays_first_address = &a;
As &a means "array’s first address" then can I generalize it so the address-of operator results in object’s first address?
>Solution :
int a[2];
If you use &a it will give you address of a[0].
&a = &a[0]
array name is pointer to its 0th element, that is base address.
Then you can use base address to get address of other locations.
such as &a[1] = (a + 1).