Quick Contact

✉
fahimkhan20148@gmail.com
📱
+971 507 286 133
Back to Notes
August 28, 2026
cpreprocessorconstants

'#define' Constants in C

A preprocessor directive is a directive, rather than a keyword; it tells the preprocessor to perform a search-and-replace.

A preprocessor directive begins with # followed by spaces or tabs, then the directive name, the term, and the value; it ends as soon as it encounters the first newline.

Any \ followed by a newline, i.e. \n, is removed. These make directives logically only one line long.

#define PI 3.142
#define ARRY {1, \
2, \
3 \
}

Any \ followed by a newline, i.e. \n, are removed. These make #define only one line long.