C files exist as 2 different types. Please find information about each of them below.
Type 1: C/C++ Source Code File
A C file contains C or C++ source code. It may have a whole program or be part of a larger project. C files use the .c extension. Unix uses .c for C and .C for C++. Main.c often holds the main() funct...
A C file contains C or C++ source code. It may have a whole program or be part of a larger project. C files use the .c extension. Unix uses .c for C and .C for C++. Main.c often holds the main() function. C++ uses .cpp or other extensions like .cc. The compiler links files or you can compile separately then link.
Header files complement source files. For example, mymath.c goes with mymath.h. The header file declares methods. The source file defines them. This divides interface and implementation.
Object files end in .o. They let you compile code then link later. Source files end in .c in many systems. C++ varies, like .cc or .cpp. After editing source, compile to machine code for the OS to run.