CJCoding With Joseph
15per day
← Back to Question List
C Code Walkthrough #4

Recursion Trace

mediumFunctions

📄 Code

Read carefully — what does this print?
1#include <stdio.h>
2 
3void countdown(int n) {
4 if (n <= 0) {
5 printf("Go!\n");
6 return;
7 }
8 printf("%d\n", n);
9 countdown(n - 1);
10}
11 
12int main() {
13 countdown(3);
14 return 0;
15}

🎯 Your Answer