Originally Posted by
sababa.sababa
Now I've studied some source code, and it seems that there're only void functions in .c files (except the main function) and returning functions in .h files.
Well, you have that COMPLETELY WRONG.
Normatively, a .c file contains function definitions (that is the functions themselves). .h files contain function declarations (aka prototypes), defines, and typedefs.
example.h
Code:
int myXfunc(int x, char *ptr);
example.c
Code:
int myXfunc(int x, char *ptr) {
int i, len = strlen(ptr);
for(i=0;i<len;i++) ptr[i] = 'A' + x;
return len;
}