ex1.c, which creates a copy of itself, then
both of them die.
ex2.c, which expects a number of seconds on the
command line. It creates a copy of itself, the child waits that many
seconds and then dies.
ex3.c, which expects a number of seconds on the
command line. It creates a copy of itself, the child waits that many
seconds and dies, the parent waits for the child to die, and then the
parent dies.
ex4.c, which expects a filename on the command
line. It opens that file as stdin, creates a copy of itself, the child
replaces itself with the "cat" program (thus catting the whole file),
and the parent reads and prints just the first line before dying.
ex5.c, which opens a pipe before cloning
itself. The parent writes a bunch of lines to the "write" end of
the pipe, while the child treats the "read" end as stdin and replaces
itself with the "more" program (i.e. it runs "more" on the lines that
the parent is writing).