Question: what is the difference between .h and .c?
Answer: . h files are called header files, they should not contain any code (unless it happens to contain information about a C++ templated object). ... c files are the source files. They typically contain the source code implementation of the functions that were prototyped in the appropriate header file.