Use Macro : Macro Constant « Macro Preprocessor « C / ANSI-C






Use Macro

#define BIG_NUMBER 10 * 10

main()
{
    int   index = 0;
    while (index < BIG_NUMBER) {
        index = index * 8;
    }
    return (0);
}

           
       








Related examples in the same category

1.Define Macro: TRUE and FAlSE
2.Define macro: constant
3.Define constant in Macro for loop controlDefine constant in Macro for loop control
4.Define constant in MacroDefine constant in Macro
5.Define Macro and use it as the loop condition
6.Define macro inside the main function
7.Define macro for string and output
8.Define marco based calculation
9.Define header file name in macro