Q5 What is Miscellaneous Directives. Types of miscellaneous directives (#undef and #pragma)?
Program: 149
These two pre-processor directives are not commonly used pre-processors.
#undef
It is used to convert a defined macro name to undefined.
For example: # undef PENTIUM
Output:
Main function
#pragma
We use it for assigning execution order to functions. It can run a function before main and before termination of program.
For example:
# pragma startup fun1
#pragma exit fun2
Output:
ABC Function Main Function XYZ Function