That's a deep question. Allocating large objects on the stack is usually frowned upon. (Especially in places with small stack limits, such as the Linux kernel.) It's common to allocate just the header for a variable sized object on the stack, but put the bulk data on the "heap". C++ vector classes do this. On-stack variable size arrays were in the C standard for a few years, Microsoft didn't implement them, and they were kicked out of C as a feature. Stack variables are usually live enough that you want the top of the stack in the cache, and big on-stack objects can break that.
Should programmers in interviews know that?