Simple #if example : if def « Macro Preprocessor « C / ANSI-C






Simple #if example



#include <stdio.h>

#define MAX 100

int main(void)
{
#if MAX>99
  printf("Compiled for array greater than 99.\n");
#endif

  return 0;
}

           
       








Related examples in the same category

1.Simple #if/#else example
2.#define, #ifdef #else example
3.#define and #ifdef