the role of preprocessor directives in c program

What is the role of preprocessor directives in c program? What if, we don't use it?
Which directives?


If you don't tell the preprocessor what to do, then the preprocessor can't/won't do those (necessary) things.
Preprocessor are executed before compilation. This is a macro processor, which is used automatically by the C compiler to transform your program before actual compilation.

In simple words, preprocessor directives tells the compiler to preprocess the source code before compiling. All the preprocessor commands are begin with "#" symbol.

The most common use of the preprocessor is to include header files. In C and C++, all symbols must be declared in a file before they can used. They don’t always need to be defined*, but the compiler needs to know they exist somewhere. A preprocessor is just another technique to help a programming language be more useful. There are numerous techniques available and every language designer must choose the ones they like.
Cross-posted here as well.
https://cboard.cprogramming.com/c-programming/177444-role-preprocessor-directives-c-program.html
Same question from the 1-poster.
Same answer from the 1-poster, conveniently 20 mins later.
Except the doofus forgot their spammy URL here.
closed account (z05DSL3A)
I tend to suspect something fishy with posts like this, but I couldn't see an angle on what what they are trying to achieve here.

One good thing, I apparently registered on cboard back in 2011 and totally forgot.
Topic archived. No new replies allowed.