AsegGasiaBlog

C Programming - Variables And Constants - Symbolic Constants

Symbolic Constant

Symbolic Constant is a name that substitutes for a sequence of a characters or a numeric constant, a character constant or a string constant.
The syntax is as follow :
#define name text

where,
name implies symbolic name in a caps
text implies value or the text.

For Example :


#define printf print
#define MAX 100
#define TRUE 1
#define FALSE 0
#define SIZE 0

The # character is used for preprocessor commands. A preprocessor is a system program, which comes into action prior to Compiler, ans it replaces the replacement text by the actual tet. This will allow correct use of the statement printf


Popular Posts