what is the difference between .c and .h files?
The difference is that a . h file can (and usually will) be #include d into multiple compilation units ( . ... c file, and you want to use it from other . c files, a declaration of that function needs to be available in each of those other .