Constants and Macros
#define <ident> <token-sequence> (constant) #define <ident>(<params>) < token-sequence>(macro)
Syntax: no “=“, no space before (<params>)
Macros are expanded by the C preprocessor(e.g. every appearance of <ident> is replaced by <token-sequence>
Use:#define MAX_STR_LEN 20 #define IS_UPPER(c) ((c)>=‘A’ && (c)<=‘Z’)#define IS_LOWER(c) ((c)>=‘a’ && (c)<=‘z’)#define TO_LOWER(c) ... char arr[MAX_STR_LEN+1], *str;….for (str=arr;*str != ‘\0’; str++){ *str = TO_LOWER(*str);}