0

In C++ (and other another programming language) dynamic variables located on the heap. Static variables located on the stack.

Question: Where will a constant be located (const) (added to stack where function is called or in processor's registry or...)?

Alireza Soori
  • 645
  • 9
  • 25
  • See [where are static variables stored?](http://stackoverflow.com/questions/93039/where-are-static-variables-stored-in-c-c). Not on "the stack". – juanchopanza Feb 22 '15 at 12:01
  • This depends entirely on the implementation. The standard makes no mention of either a 'stack' or a 'heap. Which implementation are you interested in knowing about? – Mankarse Feb 22 '15 at 12:02

0 Answers0