So I have to find the output of this code which is using the fork()
method. I thought the output was 5 \"hello\" s but instead I got 8. Why is that? This is the
You create process #1. Before printing anything, process #1 calls fork()
and generates a clone that we will call process #2. Both processes #1 and #2 call fork()
again, cloning into processes #3 and #4. Now you have 4 processes and each one of them will print hello
twice. How many hello
are printed?