Symbolic Constant is a name that substitutes for a sequence of characters or a numeric constant, a character constant or a string constant. When program is compiled each occurrence of a symbolic constant is replaced by its corresponding character sequence. The syntax is as follows:
#define name text
[where name implies symbolic name in caps.
text implies value or the text. ]
For example,
#define printf print
#define MAX 100
#define TRUE 1
#define FALSE 0
#define SIZE 10
The # character is used for preprocessor commands. A preprocessor is a system program, which comes into action prior to Compiler, and it replaces the replacement text by the actual text. This will allow correct use of the statement printf.
Advantages of using Symbolic Constants are: