Different between define and const in c | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Different between define and const in c

What different between define and const in c programming Where is usage of its

19th May 2019, 5:25 PM
Rahman Rezaie 🇦🇫
Rahman Rezaie 🇦🇫 - avatar
4 Answers
+ 3
you can't change the value of define but you can change that of const with a pointer
19th May 2019, 6:39 PM
✳AsterisK✳
✳AsterisK✳ - avatar
+ 2
The #define preprocessor statement will replace all things by another... Exemple : #define A 10 int b = A; //before compilation this line is equal to int b = 10;
19th May 2019, 5:29 PM
Théophile
Théophile - avatar
+ 1
Tanx sir
19th May 2019, 6:40 PM
Rahman Rezaie 🇦🇫
Rahman Rezaie 🇦🇫 - avatar
0
Can we change the value it?
19th May 2019, 5:30 PM
Rahman Rezaie 🇦🇫
Rahman Rezaie 🇦🇫 - avatar