Is there memory area called 'stack' in C++ to store automatic variables

前端 未结 5 456
抹茶落季
抹茶落季 2020-12-16 01:01

Is there a specific area in memory called stack in C++ where automatic variables are getting stored.

5条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-16 01:55

    • Most processors have a memory area called the stack.
    • C++ compilers typically use the processor stack for automatic variables but are not required to do so. One very common case is when a variable is kept in a processor register and never stored to memory.

提交回复
热议问题