Please explain what happens in this execl() problem.
cperciva: This had better not be a homework problem.The lines "Line number 2 before execl" and "Line number 1 before execl" will not be printed on most systems because most systems default to line-buffering (when writing to a terminal) or fully buffering (otherwise) output.The lines "... after execl" will not be printed if execl succeeds, because execl does not return if it succeeds.Other bugs: You're not checking the return status of execl; you've declared main incorrectly; you need to #include <unistd.h> and <stdlib.h> if you're going to use execl and exit; you should pass a terminating NULL to execl, not 0 (the C compiler will coerce 0 to a pointer, but NULL is not guaranteed to be (void *)0).