A software program that processes the source file before sending it to actual compilation is called preprocessor.
While Processing the source file, the preprocessor replaces header files and macros with defined files and values.
The line which starts with '#' will be processed before the actual compilation starts.
Source file inclusion
#include<stdio.h> will be replaced by the original implementation of stdio.h file. Basically, it will remove the #include statement from source code and includes stdio.h file content into the source program.
#define size 5. Here size is a macro which holds the value 5. Before the compilation starts, the preprocessor will replace size by 5 all over the program.
With the help of preprocessor, we can decide which part of the source code should compile and which part of the code should be ignored while compilation. We will discuss conditional compilation in upcoming topics.
Source File - Before Preprocessing
This preprocessed code will be sent to the compiler for further actions.