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.
Post History
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...
#3: Post edited
- 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?
- 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?
#2: Post edited
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 allocate differently depending on which programming language I use?
- 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: Initial revision
What gets allocated on the stack and the heap?
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 allocate differently depending on which programming language I use?