IHYPRESS PROGRAMMING
Tutorials and C programs with code and output for beginners
c programming
HOME | ASP | C | CSS | GNUPLOT | HTML | JAVASCRIPT | PERL | PHP | PYTHON | RUBY | SVG
CAdvanced Programming : Conditional Compilation
<12.05>
//conditional compilation example #include <stdio.h> # define A 100 int main (void) { #ifdef A printf ("A is defined\n"); #endif #ifndef A printf ("A is not defined\n"); #else printf("It is not true that A is undefined\n"); #endif #if(A <= 200 && A >= 80) printf ("A is between 80 and 200\n"); #elif (A > 200) printf ("A is larger than 200\n"); #elif (A < 80) printf ("A is smaller than 80\n"); #endif return (0); }
Hergestellt in Deutschland / Made in Germany
A is defined It is not true that A is undefined A is larger than 200
COPYRIGHT © 2015-2024 IHY PRESS Frankfurt am Main 60329 Deutschland