MACRO : MACRO « Preprocessor « C Tutorial






Replacement of the identifier by using a statement or expression.

#define CUBE(x)  x*x*x
#include <stdio.h>

main (){
    int k = 5;
    int j = 0;
    j = CUBE(k);

    printf ("value of j is %d\n", j);
}
value of j is 125








12.11.MACRO
12.11.1.MACRO
12.11.2.MACRO AND FUNCTION