Number of possible combinations of fork
问题 int main(void) { int id = 0; for(int i = 1; i < 4; i++) { if(fork() == 0) { id = i; } else { printf("Process %d created child %d\n", id, i); } } return 0; } In the code above, multiple ordering of the output (printf statements) can be generated based on how the operating system schedules processes for execution. How many different orderings are possible? You may assume that all fork and printf calls succeed. I'm trying to help my students understand how to approach this problem, however I got