0
Where a constant is stored?
Is a constant object stored in the Stack? It is not going to change, it is static no? ( or I just don't understand what it really means)
1 Answer
+ 3
Const variables will be stored on the heap as well and behave almost like usual variables except they can't be changed. Using #define (in C for example) won't even create a variable but the compiler will compile those values into the source code (preprocessing). https://code.sololearn.com/cc83ZO3R18qq/?ref=app