(i) ‘#elif’ is a preprocessor directive that provides alternate test facility. `#elif' stands for “else if”. Like `#else', it goes in the middle of a conditional group and subdivides it; it does not require a matching `#endif' of its own. Like `#if', the `#elif' directive includes an expression to be tested. The text following the `#elif' is processed only if the original `#if'-condition failed and the `#elif' condition succeeds.
For example, suppose we have following set of statements:
Using `#elif', we can abbreviate this as follows:
#if X == 1
...
#elif X == 2
...
#else /* X != 2 and X != 1*/
...
#endif /* X != 2 and X != 1*/
(ii) #pragma is an implementation oriented directive that specifies various instructions to be given to the compiler.
#pragma name
causes compiler to perform “name”
(iii)#error is a preprocessor directive used to produce diagnostic messages during debugging.
#error message
causes the compiler to display the error message and terminate processing on encountering this directive.