Another important feature of C language is that it may include instructions for the compiler. Though these instructions are not directly the part of C language, they expand the scope of programming environment. These are known as preprocessor. In this chapter, we will discuss about these preprocessors.
A unique feature of C language is the preprocessor. The C preprocessor, as its name implies, processes before the processing of C source program. It is a program that processes the source code before the compiler translates the source code into the object code. During processing, these preprocessors perform some modifications on the source code based on the instructions provided by the preprocessors. These instructions are known as preprocessor commands or directives. Each of the Preprocessor directives begin with a # symbol and do not require semicolon(;) at the end. The preprocessor is used to make the source code more readable, much easy to modify, portable and more efficient.
Some common Preprocessor directives are:
• #define directive – To define a symbolic constant or macro.
• #undef directive – To undefine a symbolic constant or macro.
• #include directive – To include another file in a source program.
• Conditional Compilation directive – To compile parts of source code conditionally.
We already discussed about #define and #include directive in brief. Here they would be discussed in details along with other directives.
Review the options below to login to check your access.
Log in with your Cambridge Aspire website account to check access.
If you believe you should have access to this content, please contact your institutional librarian or consult our FAQ page for further information about accessing our content.