I am trying to execute the following chunk of code.
int **p = (int**)new int(5);
cout << *p;
I am getting output 00000005
As per my understanding , we don't need to typecast return value from new, as it automatically does.
Like in the following statement
int *ap = new int(20);
We don't need to do that, So why I need to do in case of double pointer??
Second thing is, in cout statement, I need to put pointer deference operator once not twice. Even after that i am getting strange output like 00000005
Please someone help me.