Aldee Aldee - 1 year ago 80
C Question

What is the function of an asterisk before a function name?

I've been confused with what I see on most C programs that has unfamiliar function declaration for me.

void *func_name(void *param){

What does
imply for the function? My understanding about (
) in a variable type is that it creates a pointer to another variable thus it can be able to track what address at which the latter variable is stored in the memory. But in this case of a function, I don't know what this
asterisk implies.

Answer Source

The asterisk belongs to the return type, and not to the function name, i.e.:

void* func_name(void *param) { . . . . . }

It means that the function returns a void pointer.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download