Showing posts with label use of C - PREPROCESSOR. Show all posts
Showing posts with label use of C - PREPROCESSOR. Show all posts

Saturday, 27 July 2013

C - PREPROCESSOR

INTRODUCTION:
The C preprocessor, often known as cpp, is a macro processor that is used automatically by the C compiler to transform your program before compilation. It is called a macro processor because it allows you to define macros, which are brief abbreviations for longer constructs.
The C preprocessor is intended to be used only with C, C++, and Objective-C source code. In the past, it has been abused as a general text processor. It will choke on input which does not obey C's lexical rules. For example, apostrophes will be interpreted as the beginning of character constants, and cause errors. Also, you cannot rely on it preserving characteristics of the input which are not significant to C-family languages. If a Makefile is preprocessed, all the hard tabs will be removed, and the Makefile will not work.

Include Syntax
Both user and system header files are included using the preprocessing directive `#include'. It has two variants:
#include <file>

#include "file"