I was just playing with pointers and found this weird thing. I created the pointer p
and displayed its address as I did in the following program, the address of p
and &p
is different, why are they different?
int main()
{
int *p, s[5];
cout << p <<endl;
cout << &p <<endl;
p = s;
cout << p <<endl;
cout << &p <<endl;
}