Welcome to Software Development on Codidact!
Will you help us build our independent community of developers helping developers? We're small and trying to grow. We welcome questions about all aspects of software development, from design to code to QA and more. Got questions? Got answers? Got code you'd like someone to review? Please join us.
Comments on What gets allocated on the stack and the heap?
Post
What gets allocated on the stack and the heap?
+12
−2
I was told by my professor/book that computer programs use two kinds of memory and that all variables get allocated either on the stack or on the heap. Is this true? How can I tell where a variable gets allocated? Does the compiler handle allocation differently depending on which programming language I use?
1 comment thread