To see the domestic textbooks that write:
But there are some special circumstances. First: Operands of an array as a & operator
#include <stdio.h>
int main (void)
{
int a[] = {1,2,3};//creates an array
int *l;//a pointer
int (*P) that points to integers [ 3];//A pointer to an array
l=a;//array name can only represent a pointer to an integer
//p=a;
The p=&a;//array name address is the pointer to the arrays
printf ("p=%p\n", p);
printf ("l=%p\n", l);
printf ("p+1=%p\n", p+1);
printf ("l+1=%p\n", l+1);
return 0;
}
In this example, the array name of a, in p=&a;, does not represent the address of the first element of the array, but represents the entire array. The second scenario: the operands of the array as the sizeof operator.
#include <stdio.h>
int main (void)
{
int a[] = {1,2,3};//Create an array
printf ("size=%d\n", sizeof a );
return 0;
}
In this example, the array name A, which is the operand of the sizeof, does not represent the address of the first element of the array.