C examples for Preprocessor:Preprocessor Operators
Use #define Statement to create two constants
#include <stdio.h> #define YES 1//w ww.jav a 2 s . c o m #define NO 0 int isEven (int number){ int answer; if ( number % 2 == 0 ) answer = YES; else answer = NO; return answer; } int main (void) { int isEven (int number); if ( isEven (17) == YES ) printf ("yes "); else printf ("no "); return 0; }