int i=24;
int* poin;
*point=i;
cout<<*poin;
cout<<poin;
cout<<&i;
why pion and &i does not show the same results as poin contain the address of i and &i means adress of i
int i=24;
int* poin;
*point=i;
cout<<*poin;
cout<<poin;
cout<<&i;
why pion and &i does not show the same results as poin contain the address of i and &i means adress of i
Why do you think poin contains the address of i? If you had done poin = &i, then yes. Otherwise, no.
int *poin defines a pointer, but it doesn't point to anywhere in particular. So *poin = i puts the value of i in the memory address pointed to by poin (wherever it is).
you have your referencing/dereferencing operators backwards.