Why do so many C functions have Void return types but do not return nothing, for example I was looking at the man page for malloc and it return type is Void, but it also says returns an adress to where it has size_t bytes allocated.
void * malloc(size_t n)
The malloc() functions allocates size bytes and returns a pointer to the allocated memory.
How does casting work in these cases?
Also what does it mean to have type void in a parameter?
The free function has type void.
void free(void *ptr)