Skip to content

Instantly share code, notes, and snippets.

@LokeshKumarES
Last active December 19, 2021 12:40
Show Gist options
  • Save LokeshKumarES/f12885c40c0a7831bb5be49f26fdf24b to your computer and use it in GitHub Desktop.
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
#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