When Preprocessing Is Done in C?

The C preprocessor is a macro processor that is used automatically by the C compiler to transform your program before actual compilation. It is called a macro processor because it allows you to define macros, which are brief abbreviations for longer constructs.

What happens during preprocessing?

In computer science, a preprocessor (or precompiler) is a program that processes its input data to produce output that is used as input to another program. The output is said to be a preprocessed form of the input data, which is often used by some subsequent programs like compilers.

What are preprocessing commands in C?

Following are the preprocessor commands in C programming language...
  • #define. #define is used to create symbolic constants (known as macros) in C programming language. ...
  • #undef. #undef is used to destroy a macro that was already created using #define.
  • #ifdef. ...
  • #ifndef. ...
  • #if. ...
  • #else. ...
  • #elif. ...
  • #endif.
Maya Lin-Takahashi

Maya Lin-Takahashi

Consumer Tech & Gadget Reviewer

Maya is a hardware enthusiast who tests and reviews smart home devices, smartphones, wearables, and audio gear. She focuses on practical consumer value and build quality.