We can define constants of any Data type by using the #define compiler directive. Its syntax is simple as under :
#define SALARY_MIN 1500
#define SALARY_MAX 15000
#define assigning SALARY_MIN and SALARY_MAX by the values 1500 and 15000, respectively. Because C is a case-sensitive language ,it distinguishes between lowercase and uppercase letters in variable names. It is recommended to use capital letters in defining global constants.Now by using this simple code we define max and min salary globally.While using these two variable at any place in our program compiler take their defined value.
NOTE : #define should be used at the top-most position of program before every code whether its #include.
