Use preprocessor to define integer and string : define « Preprocessor « C Tutorial






#include <stdio.h>

#define VAL 35
#define HELLO "HELLO"

main ()
{
    int res;

    res = VAL-5;
    printf ("res = VAL-5: res == %d\n", res);
    printf ("%s",HELLO);
}
res = VAL-5: res == 30
      HELLO








12.2.define
12.2.1.Use preprocessor to define integer and string
12.2.2.Use #define to define constant