相关疑难解决方法(0)

在C中,大括号是否作为堆栈框架?

如果我在一组新的花括号中创建一个变量,那个变量是从结束括号上的堆栈中弹出的,还是会挂起直到函数结束?例如:

void foo() {
   int c[100];
   {
       int d[200];
   }
   //code that takes a while
   return;
}
Run Code Online (Sandbox Code Playgroud)

会不会d是在占用内存code that takes a while部分?

c memory stack

152
推荐指数
4
解决办法
9357
查看次数

标签 统计

c ×1

memory ×1

stack ×1