A _|_ parent/ \child B \ __/ \ parent/ \child \ C D E \_/ / \ / F / \_/ | GEach letter indicates an output operation that should output the corresponging letter, and flow of control is from top to bottom, with no loops. So, your program might, when run, output ABCDEFG, but it could, just as easily, output AEBDCFG. It should not, however, be able to output ABCEFDG.
Big Hint: See lecture 4 and note the following.
The parent process in the above diagram outputs ABCFG, while one child outputs D and the other outputs E; the parent will have to selectively wait for thild D to finish before it outputs F, and the parent must not mistake the termination of child D for child E!
Note that fprintf() output routines in C buffer their output! Therefore, you should either use write() to output each character (avoiding the buffering) or you should use the sequence of fprintf();fflush() (this defeats the buffering).
For this implementation, discuss the problems you would encounter in a large scale shared memory multiprocessor where many CPU's (under the direction of the operating system) were competing to take processes from and add processes to the ready queue.