Get to know Preprocessor - C Preprocessor

C examples for Preprocessor:Preprocessor Operators

Introduction

The preprocessor does text substitution within the source code before the source is compiled.

The preprocessor are all start with a hash sign #.

The preprocessor must appear as the first non-whitespace character on a line and they do not need to end with a semicolon.

The following table shows the preprocessor directives available in C.

Directive Description
#include File include
#define #undefDefine macro Undefine macro
#ifdef #ifndefIf macro defined If macro not defined
#if #elif #else #endifIf Else if Else End if
#line #error #pragma Set line number Abort compilation Set compiler option

Related Tutorials