(Solved) : Include Include Int Main Int Pid Int Value 5 Pid Fork Pid 0 Execlp Bin Ls Ls Null Value 10 Q44141753 . . .
#include <stdio.h> #include <unistd.h> int main( ){ int pid; int value = 5; pid = fork( ); if (pid == 0) { execlp(“/bin/ls”, “ls”, NULL); value += 10; printf(value); } else { wait(NULL); } return 0;}
Question: What output is printed on the screen when the aboveprogram is executed?
a.
No output is printed on the screen
b.
15
c.
5
d.
10
Expert Answer
Answer to #include #include int main( ) { int pid; int value = 5; pid = fork( ); if (pid == 0) { execlp(“/bin/ls”, “ls”, NULL); v…
OR