What are Preprocessor Directives?

What are Preprocessor Directives?

Preprocessor Directives

These are instructions given to compiler before execution of C++ program. It is also called compiler directives. These are processed by preprocessor. The preprocessor directives are started with hash symbol #. Preprocessor Directives will be written at the top of every program. There are two types of preprocessor directives:

Include Preprocessor

It is used to include header files in the program. For Example #include<iostream.h>. The word iostream stands for input/output stream. Stream represent flow of data from input devices to memory and from memory to output devices.

Define Preprocessor

It is used to define constants after header files. For Example #define Marks 68

Post a Comment

Previous Post Next Post