employer cover photo
employer logo
employer logo

Foundation Devices

Is this your company?

Foundation Devices Interview Question

What's the difference between a heap and a stack?

Interview Answer

Anonymous

Jan 18, 2022

This is a question of low-level memory model of languages like C and Rust. Stack is an area of memory that's pre-allocated by the linker and is used for local variables and a function call stack. Heap is an (optional) area of memory that's used for dynamic memory allocation.