Question: #include #include int main( ) { int pid; int value = 5; pid = fork( ); if (pid == 0) { execlp(/bin/ls, ls, NULL); value

#include  #include  
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 above program is executed?

a.

No output is printed on the screen

b.

15

c.

5

d.

10

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Lets analyze what happens step by step when the given C program is executed Step 1 Library Inclusion... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!