1. # define and # UNDEF define or cancel defining condition compilation symbols
2. # If, # Elif, # else and # endif are used to skip based on conditions.Source codeSection
3. # ifdef, # ifndef determine whether the symbol is defined
4. # error, # warning is used to issue errors and warnings
5. # Line
Example:
# Include "stdio. H "<br/> # define AAA 3 <br/> int main () <br/>{< br/> # If (AAA = 1) <br/> printf ("AAA = 1/N"); <br/> # Elif (AAA = 2) <br/> printf ("AAA = 2/N"); <br/> # else <br/> printf ("AAA = 3/N "); <br/> # endif </P> <p> # undef aaa </P> <p> # ifndef AAA <br/> printf ("AAA hasn't been defined! /N "); <br/> # else <br/> printf (" AAA has been defined! /N "); <br/> # endif </P> <p> # line 50 <br/> # warning // make a warning <br/> // # error // make a error <br/> // system ("pause "); <br/> while (getchar ()! = 'Q'); <br/>}< br/>
Result: