Another way to define constants is to use the #definepreprocessor directive. This takes the form of #define symbol text, where symbol is an identifier and text is a literal constant or a previously defined symbol. Symbol names are typically all in uppercase and underscores are used to distinguish them from variable names.
An example would be to define the number of inches in feet or the number of feet in a yard:
#define INCHES_PER_FOOT 12
#define FEET_PER_YARD 3
feet = inches / INCHES_PER_FOOT;
yards = feet / FEET_PER_YARD;
When the preprocessing phase of compilation encounters a definition such as this, it carries out a textural substitution. There is no type associated with the symbol and there is no way to verify that the actual use of a symbol matches its intended use. For this reason, the use of these kinds of constants is discouraged. We only included them here for completeness since many older C programs may make extensive use of...