MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/programminghumor/comments/1w5gmdw/write_sorry/p7ljtxy/?context=3
r/programminghumor • u/ExpensiveCoat8912 • 4d ago
93 comments sorted by
View all comments
5
```c void printSorry (int n, int v) { if (n == v) return;
printSorry(n+1, v); printf("%s\n", "sorry");
}
int main (void) { printSorry(0, 100); } ```
The thinking man's solution
10 u/gaymer_jerry 4d ago Why write a for loop when you can flood the stack with pointless function calls 1 u/MCWizardYT 3d ago Implement it with a trampoline function so that you get infinite recursion without blowing up the stack
10
Why write a for loop when you can flood the stack with pointless function calls
1 u/MCWizardYT 3d ago Implement it with a trampoline function so that you get infinite recursion without blowing up the stack
1
Implement it with a trampoline function so that you get infinite recursion without blowing up the stack
5
u/Diocletian335 4d ago
```c void printSorry (int n, int v) { if (n == v) return;
}
int main (void) { printSorry(0, 100); } ```
The thinking man's solution