#include <stdio.h>

int fun();

int main()
{
 int x=0;
 int y=0;

 x=37;
 y=3;

 fun(x,y);


 system("pause");
 return 0;


}

int fun(int x,int y)
{
 int ret;

 printf("in fun, x:%d,y:%d\n",x,y);
 if(x<y)
 {
  ret=-3;
 }
 else ret= fun(x-y,y+3)+y;
 printf("%d\n",ret);
 return ret;
}

 

//////////// 이런코드가 있을때,

 

fun(37,3)이 call 될때에 스택에 fun의 스택프레임이 얼마나 쌓이는 거야???

 

아 난 영어도 딸려 흑

문제는 대략

How many stack frames of "fun" will be in stack at most at thesame time if "fun(37, 3)" is called?

인데 아 휴학하면서 데이터구조 공부중인데 괜히 영어공부랑 같이 한다고 영어책 사서 고생중 흑

 

갈켜줘잉