Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <unistd.h>
- void recursion(int n) {
- if (n!=0){
- if (fork() == 0) {
- recursion(n-1);
- }
- }
- }
- int main() {
- recursion(10);
- while (1);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement