GCC compiles a C/C++ program into executable in 4 steps as
Pre-processing: via the GNU C Preprocessor (cpp.exe), which includes the headers (#include) and expands the macros (#define).
Compilation: The compiler compiles the pre-processed source code into assembly code for a specific processor.
Assembly: The assembler (as.exe) converts the assembly code into machine code in the object file.
Linker: Finally, the linker (ld.exe) links the object code with the library code to produce an executable file .out