Declaration of malloc
function:
void *malloc(size_t size);
Here, malloc
returns void pointer. So, A void
function returns nothing, then
Why we assign malloc(function call) value to pointer?
For example:
int *ptr;
ptr = malloc(10 * sizeof (*ptr));
^^^
What does return value holds from malloc()
???