Program to create four processes (1 parent and 3 children) where they terminates in a sequence as follows :
(a) Parent process terminates at last
(b) First child terminates before parent and after second child.
(c) Second child terminates after last and before first child.
(d) Third child terminates first.
Prerequisite : fork(),
child-->pid=50 and ppid=47 child-->pid=49 and ppid=47 child-->pid=48 and ppid=47 parent-->pid=47
This code runs on Linux platform.
Want to learn from the best curated videos and practice problems, check out the C Foundation Course for Basic to Advanced C.