Last active
December 19, 2021 12:40
-
-
Save LokeshKumarES/f12885c40c0a7831bb5be49f26fdf24b to your computer and use it in GitHub Desktop.
What is Conditional Compilation? how to use #ifdef #else #endif block by macro name
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<stdio.h> | |
# define BOY | |
int main() | |
{ | |
//Conditional Compilation | |
# ifdef BOY | |
printf("He is a boy."); | |
# else | |
printf("She is a girl."); | |
# endif | |
printf("\n Good guess!"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment