What happens when you type gcc main.c
First, we have to recognize that all files ending with “.c extension” are C programming files and knowing that in advance we can continue.

We also have to understand all the compilation process of a .c file.
Pre-processor: Basically in this step, it processes the file and it takes it into the compiler.
To do this operation we need to use gcc -E
Compiler: This is the second step in which the file it’s translated into machine code.
To do this operation we need to use gcc -S
Assembler: It compiles the file into binary code.
To do this operation we need to use gcc -c
Linker: This is the final process in which it creates the final executable file.

Note: We use gcc -o <file> place the output into <file>
In summary, when we use gcc main.c it creates an executable called “a.out”.
