✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.
Consider the following programs
exec1.c
#include <unistd.h>#include <stdio.h>int main() { execl("./exec2", "./exec2", NULL); }
exec2.c#include <unistd.h>#include <stdio.h>int main() { execl("/bin/ls", "/bin/ls", NULL);
printf("hello\n");}
Compiled as
cc exec1.c -o exec1cc exec2.c -o exec2
And run as
$ ./exec1
Explain the output of the above command (./exec1)
Assume that /bin/ls , i.e. the 'ls' program exists.