18 lines
280 B
Markdown
Raw Permalink Normal View History

2021-07-22 20:45:06 +03:00
## Fork 101
Answer the questions given the following program (without running it):
```
#include<stdio.h>
2021-09-15 03:48:49 -07:00
#include <unistd.h>
2021-07-22 20:45:06 +03:00
int main()
{
2021-09-15 03:48:49 -07:00
fork();
printf("\nyay\n");
return 0;
2021-07-22 20:45:06 +03:00
}
```
1. How many times the word "yay" will be printed?
2. How many processes will be created?