What is the difference in use of define and const variable?

Answer

1.type checking in const that is not a part of #define. 2.scope 3.debugging is possible with const.

Answer

const variable can be localized whereas #define variable cannot be done so.

 

Improve Answer Discuss the question "What is the difference in use of define and const variable?" Watch Question

First answer by Brijendra Trivedi. Last edit by ID3418871368. Question popularity: 184 [recommend question]


Research your answer:

Can you answer other questions about software and apps?

Answers.com > Wiki Answers > Categories > Technology > Computers > Computer Software and Applications > What is the difference in use of define and const variable?

Our contributors said this page should be displayed for the questions below. (Where do these come from)
If any of these are not a genuine rephrasing of the question, please help out and edit these alternates.
Define and const?  Define artifical variable?  Difference between const and define?  What does it mean to define a variable?  Comparison between define and const keyword?  What is the difference between Macro and Const?  What is the difference betwen const and define?  What is the difference between const and macro?  What is the difference between define and const?  Would you define variable in algebraic expressions?  What is the difference between define vs const in C?  What is the difference between Macro and Const in C?  Difference between const char pchar const pconst char const p?