-
카테고리
-
세부 분야
프로그래밍 언어
-
해결 여부
미해결
재귀함수 디버깅
21.12.07 11:26 작성 조회수 313
0
int main() { my_func(1); return 0; }
void my_func(int n) { printf("Level %d, address of variable n = %d\n", n, (int) & n); if (n < 4) // stop condition my_func(n + 1); printf("Level %d, address of variable n = %d\n", n, (int)&n); }
if문 아래에 있는 printf에 디버깅을 찍어봤는데 printf가 한번 출력하고 끝나지 않고 왜 다시 printf로 올라가서 반복하나요? 스택에 있는거 다 뺄 때까지 되감기 하는건가요?
답변을 작성해보세요.
답변 1