1.

What Is The Benefit Of Using Const For Declaring Constants Over #define?

Answer»

The BASIC difference between them is that, a CONST variable is a real variable which has a datatype and it EXISTS at run TIME, and it can't be altered. But a macro is not a real variable, but it carries a constant value which replaces all the OCCURRENCES of that macro at the time of pre-processing.

The basic difference between them is that, a const variable is a real variable which has a datatype and it exists at run time, and it can't be altered. But a macro is not a real variable, but it carries a constant value which replaces all the occurrences of that macro at the time of pre-processing.



Discussion

No Comment Found