Ask your own question, for FREE!
Computer Science 13 Online
OpenStudy (anonymous):

explain the difference between #define and const

OpenStudy (anonymous):

define is being precompiled and const is not and for better explanation just google it..

OpenStudy (anonymous):

#define directive is a preprocessor directive; the preprocessor replaces those macros by their body before the compiler even sees it. Think of it as an automatic search and replace of your source code. A const variable declaration declares an actual variable in the language, which you can use... well, like a real variable: take its address, pass it around, use cast it, convert it, etc.

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!