Preprocessor directives: These are the commands given to a program known as preprocessor that processes the source code before it passes through the compiler. Each of these preprocessor directives begins with a # symbol. These can be placed anywhere in the program but usually placed before main ( ) or at the beginning of the program. Before the source code passes through the compiler, it is examined by the preprocessor for any directives. If there are any, appropriate action is taken and the source program is handed over to compiler. These directives can be divided into following three categories:
1. Macro substitution directives
2. File inclusion directives.
3. Compiler control directives.
#include “filename”: The search for the file is made first in the current directory and then in the standard directories as mentioned in the include search path.
#include : This command would look for the file in the standard list of directories.
Both of these directives cause the entire contents of filename to be inserted into the source code at that point in the program.