Interesting Facts about Macros and Preprocessors in C – GeeksforGeeks

One of the phase in compilation is pre processor replacement. In C programming there are multiple pre processor directives. The common one are include and define. There could be other directives like pragma and others which are compiler supported ones and may not be supported in all the compilers.

#include directive can be used to include the header files. If the header files are included <> brackets, the header file will be searched in the standard include paths mentioned as part of compilation with -I option. If the header files are used within double quotes “”, the current path will be used to search first before searching the standard paths.

#define will replace all the tokens with the values defined for the token.

Source: Interesting Facts about Macros and Preprocessors in C – GeeksforGeeks

About the Author

Yogi

21 years of experience in various layers of software. Primarily experienced in system side software design and development on server management software. Interested in linux development in x86 and arm architecture.