3,882
社区成员
发帖
与我相关
我的任务
分享
#include <stdio.h>
void func(int level) {
int local_var;
printf("level,&local_var=%d,0x%p\n",level,&local_var);
if (level) func(level-1);
}
int main() {
func(9);
printf("\n");
func(3);
printf("\n");
return 0;
}
//level,&local_var=9,0x0012FF48
//level,&local_var=8,0x0012FF3C
//level,&local_var=7,0x0012FF30
//level,&local_var=6,0x0012FF24
//level,&local_var=5,0x0012FF18
//level,&local_var=4,0x0012FF0C
//level,&local_var=3,0x0012FF00
//level,&local_var=2,0x0012FEF4
//level,&local_var=1,0x0012FEE8
//level,&local_var=0,0x0012FEDC
//
//level,&local_var=3,0x0012FF40
//level,&local_var=2,0x0012FF34
//level,&local_var=1,0x0012FF28
//level,&local_var=0,0x0012FF1C
//
//