Confusion regarding a function definition in C

Posted by user34790 on Stack Overflow See other posts from Stack Overflow or by user34790
Published on 2012-09-01T03:05:56Z Indexed on 2012/09/01 3:38 UTC
Read the original article Hit count: 130

Filed under:
|

I found this function definition

void *func(void *param) {

}

Actually, I have a certain confusion regarding this function definition. What does void * mean in the return type of the function as well as the argument. I am a beginner in C. So please don't mind. Thank you

void *func(void *param) {
  int s = (int)param;
  ....
}

Well looking at the above program which I found. I think it should have been

int *s = (int *)param;

isn't it? I am confused

© Stack Overflow or respective owner

Related posts about c

    Related posts about function