GCC- C Compilation- A simple run down

An example of using gcc command to compile main.c file and redirecting the compiled output to ./a.out

GCC is a compiler collection to compile and process C, C#, C++, etc. programming files. There are 4 components of the compiler as follows-

Preprocessor- Removes comments, replace macro names by its value, include header files in source code.

Compiler- Generate assembly code

Assembler- converts assembly code into binary/object code.

Linker-Combine all the c files in the same project, link the code to the library.

So, when we run gcc command on our c-file, it will go through the above process and give us a compiled executable file.

Like what you read? Give Sue a round of applause.

From a quick cheer to a standing ovation, clap to show how much you enjoyed this story.