Operating System Programming
Write a C/C++ or Pseudo-code program to do the following (you can omit the #include section and variables declaration section):
Create 10 child processes and each child process will in turn create a grandchild process.
The parent process will exit after created 10 child processes and printed out their process ID;
A child process will wait for the grandchild to terminate before exit.
The grandchild process will exit if a random number is less than 5 (the random number is between 1 to 10).