It\'s simple question but why would someone use #define to define constants?
What\'s the difference between
#define sum 1 and const int su
#define sum 1
const int su
In simple words
#define sum 1 /*is pre processed*/
Which means, that sum doesn't exist after the preprocessing stage is finished.
sum
const int sum = 1; /*is compiled/linked*/
Which means sum exists till the executable is made out of your program.