Im reading a book in c++ and I was doing some tests as I didnt understand something and when I tried printing these 3 lines I was expecting something different for all 3. The first one, the location in memory of the pointer, the second one, the address stored by the pointer, and the third one, the value at the address stored by the pointer. But instead the first two were the same:
cout <<&arey <<"\n";
cout <<arey <<"\n";
cout <<*arey <<"\n";
output:
0x6afee8
0x6afee8
0
Can someone explain why as I have read that the name of the array is a pointer to the array so if it is a pointer it should have its own memory address right?