Mail Archives: djgpp/1997/11/25/08:18:55
> >array == &array
> This is NOT true. `&array' is a pointer to array, i.e. a pointer to the
> pointer of the first element in the array.
No, it is true. Even if they weren't the same, "&array" would be the
right one, since it's a pointer, and "array" isn't a pointer - it's
the whole array, like "int" is all 32-bits of an integer.
Besides, you can try it yourself:
#include <stdio.h>
int foo[10];
main()
{
printf("foo=%p &foo=%p\n", foo, &foo);
return 0;
}
$ ./array
foo=10000090 &foo=10000090
- Raw text -