Hi all,
Can I assign a value to the symbol as possible in C or not for #define?
Hi all,
Can I assign a value to the symbol as possible in C or not for #define?
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend4days leftRegister
Shweta LodhaRank #31 · 39.8K reputationPosted Feb 5, 2016, 5:31 PM EST
Hi Nithika,
The #define directive cannot be used to declare constant values as is typically done in C and C++. It is used to define a symbol used at compile time. More info:
Sujeet SumanRank #790 · 2.9K reputationPosted Feb 5, 2016, 6:28 PM EST