Can someone please explain to me what is happening when I do a malloc(0).
This is what I did.
int* p = (int*)malloc(0) ;
Then I printed the value of p and of course it was non-null.
But has it allocated memory or what?
I would think that it would return a null.
So, can someone please explain what is going on?
Many thanks.
This is what I did.
int* p = (int*)malloc(0) ;
Then I printed the value of p and of course it was non-null.
But has it allocated memory or what?
I would think that it would return a null.
So, can someone please explain what is going on?
Many thanks.
Comment