I know this is a very basic question but I am not getting it right.
char * data = new char[5];
data = "hamz";
Here I created a pointer to char, data. Data is a pointer and it stores the address of a char array on heap.
When I cout<<data;
Why does it not show me address? It shows me "hamz".
Same with this
cout<<&data[0];
How could I know the address which is stored in data? As it stores the address of the array on heap.