In this program:
#include <stdio.h>
int main()
{
int a[2];
int *b=&a;
printf("%p\n",a);
printf("%p\n",&a);
printf("%p",b);
return 0;
}
All printing same things!! a
is a pointer to first place of our array right?! It must be saved somewhere!! so &a
or b
must be a pointer to a
...
I'm wrong?!
BTW ive got a warning from my compiler about int *b=&a;
[Warning] initialization from incompatible pointer type [enabled by default]