1

Does a variable declared locally int const found in the stack and globally int const found in data segment read-only area.

vii_hi
  • 11
  • 3
  • A local `const` variable should still have automatic storage (which is probably stack) like normal variables, but it is still read-only. – mediocrevegetable1 Aug 25 '21 at 05:01
  • 2
    Does this answer your question? [Where are constant variables stored in C?](https://stackoverflow.com/questions/1576489/where-are-constant-variables-stored-in-c) – Krishna Kanth Yenumula Aug 25 '21 at 05:02

0 Answers0