What are Symbolic Constants in C Programming?

A symbolic constant is a name given to some numeric value, or a character constant or string constant.

Symbolic names are also known as constant identifiers. Preprocessor directive #define is used for defining symbolic constants.

Syntax for Creating Symbolic Constants

#define   symbolic_constant_name   value_of_the_constant

Examples of Symbolic Constants

#define PI 3.141592
#define GOLDENRATIO 1.6
#define MAX 500

Here PI, GOLDENRATIO, SIZE are symbolic constants.

Note: symbolic constants names are written in uppercase by convention, but it is not required.