C languageC SolutionChapter 8Programming

Q3 What is Conditional Compilation? how to use #ifdef #else #endif block by macro name.

Program: 147

What is Conditional Compilation? how to use #ifdef #else #endif block by macro name.

Definition:

It is a process to skip the part of a source code, if macroname has been defined, the block of code (#ifdef) will be processed otherwise #else block.

Conditional Compilation

Example:

Output:

He is a boy.
 Good guess!

Lokesh Kumar

Being EASTER SCIENCE's founder, Lokesh Kumar wants to share his knowledge and ideas. His motive is "We assist you to choose the best", He believes in different thinking.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.