#endif Directive

This page was translated by a robot.

The #endifdirective ends a conditional compilation. The code block of the preceding #if-, #else-, #elif-, #ifdef- or - #ifndefdirective is completed.






Large array
#include <stdio.h>
#define ARRAY_SIZE 10000000

int main(){
  #if ARRAY_SIZE > 1000
    printf("Large array\n");
  #endif
  return 0;
}

Details

The #endifdirective takes no arguments. Instead, however, a line comment is often #endifseen after the to identify what #endifit is. In some cases, the comment characters are even omitted, since the preprocessor should ignore them anyway. However, it is recommended to mark the comment as a comment.

#if MEMORY > 100000

...

#endif // End large Memory