0
Tell the reason
I am writing at the end of program.. Cout<< p; Cout << &p; It giving different memory address what does it mean ??
2 Antworten
+ 4
Assuming 'p' is some pointer, then
cout << p;
will give you the memory adress of the cell the pointer is currently pointing to, while
cout << &p;
will give you the memory adress of the pointer variable itself, since a pointer is also a variable that sits on the stack and therefore has a memory adress.
0
Thnx bro