When processor encounters #include directive, it replaces directive with the content of the included file. Included file is also preprocessed which may result in preprocessing of more #includes recursively.

#include directives are mostly used to include header files.

We can see the preprocessed file by using the following command.

clang++ -ggdb -std=c++20 -E main.cpp -o preprocessed.i

-E flag is used to tell the compiler to output just preprocessed code. Using -o flag, we store the preprocessed code to a file.