The preprocessors are the directives written in a program for the compiler to carry out an operation under certain conditions. Preprocessor directives are placed in the source program before the main(). The need arises when a program becomes larger and has to be managed in multiple files e.g., projects. When a number of people work on a project, each may require using a specific function, which has already been defined in a file. The case may be with data files or constants or functions or similar tokens in C language. But it is not available in the current file of the program. When all files put together to operate collectively, may result in a re-declaration error. In another situation a file is used to store data, the control is transferred to another program module. Now if the file is already in use then it need not be open again.
Therefore it becomes necessary to check for its existence by the compiler.