title: Are global variables in C++ stored on the stack, heap or neither of them?
body: <p>Initially I was pretty sure that the correct answer had to be &quot;None of them&quot;, since global variables are stored in the data memory, but then I've found this book from Robert Lafore, called &quot;Object Oriented Programming in C++&quot; and it clearly states that, according to the C++ standard, global variables are stored on the heap. Now I'm pretty confused and can't really figure out what's the correct answer to the question that has been asked.</p>
  <p>Why would global variables be stored on the heap? What am I missing?</p>
  <p>EDIT: <a href="https://docs.google.com/file/d/0B21HoBq6u9TsUHhqS3JIUmFuamc/view" rel="nofollow noreferrer">Link to the book</a> - page 231</p>