Assume the following function prototype:
void *function(int arg).
Is that a pointer to a function? If so, how can this return a value, if it’s return type is void? The description of the function says that it may return a positive integer or NULL. Since these are two different “types”, would that be the reason it’s void? To avoid typecasting?
It is not a pointer to a function. It says that it returns a void pointer. The advantage of a function returning a
void *is that you can cast it to any type in the function. See here for an explanation.